I am looking at creating a sql server failover group using the azure cli. The following command is being used :
az sql failover-group create --name sql1-fg --resource-group sql1 --server sql1 --partner-server sq1l-dr --partner-resource-group sql1-dr --failover-policy Manual
However I get the following error :
Grace period value should not be provided when failover policy Manual is selected for the read-write endpoint
I have not passed in this parameter but with grace-period being a default parameter with a value of 1, my query is how do I exclude this from the command line. I have tried setting to 0, -1, $false, $null, etc.
I can reproduce your issue on my side, I think it may be a bug of Azure CLI, because it is unreasonable.
Even if I create the failover group with Automatic
first, then use the az sql failover-group update
to set the --failover-policy
to Manual
, it always gives the same error message.
I have opened a new issue in the Github, you could check it. Or you could create the Automatic
group first, and set it to Manual
in the portal.