azure-cli
azure-cli copied to clipboard
Setting the 'deleteOption' property on a public IP address via CLI doesn't change the value
Describe the bug
The 'deleteOption' property on a public IP address by default is null. It should be possible to change this property on an existing object via the CLI, but when running the below command no error is returned but the property value doesn't change.
To Reproduce az network public-ip update --ids /id/of/public/ip --set deleteOption=delete
Expected behavior The deleteOption should have the value 'delete' afterwards. Instead, it's left as null. Other properties e.g. idleTimeoutInMinutes can be set this way without issue.
Environment summary version 2.30.0, being run from powershell 7 on windows 10.
@kairu-ms, please help take a look.
The same happens when using REST and it feels like a bug to me. It seems that if you create a public IP when you create a VM (via the portal) and select the option to delete it when the VM is deleted, the DeleteOption is set to Delete but that cannot be changed afterwards and DeleteOption cannot be added to a public IP address object if it is not there already - in REST the PUT call succeeds to do this but the returned object is missing the DeleteOption and it has not changed. @yonzhan
@necusjz for awareness
I have created support request 2302230050000653 to report this issue
Any news on this one ?