It appears there is an issue with the az backup vault create cmdlet to create a recovery vault with immutability enabled. When I run the following command it errors out.
*PS /home/karl> az backup vault create --resource-group $resourcegroupname --location "Central US" --name newrvkdb123vault **--immutability-state Locked ***
(UserErrorUnsupportedVaultImmutabilityStateChange) The immutable vault property for this vault is locked, hence, this setting cannot be disabled. The vault has its immutable vault property enabled and locked, and it can no longer be reverted to a non-immutable vault. Refer to the documentation to learn more: https://aka.ms/AB-ImmutableVaults-States
Code: UserErrorUnsupportedVaultImmutabilityStateChange
Message: The immutable vault property for this vault is locked, hence, this setting cannot be disabled. The vault has its immutable vault property enabled and locked, and it can no longer be reverted to a non-immutable vault. Refer to the documentation to learn more: https://aka.ms/AB-ImmutableVaults-States
If I run the command without --immutability-state Locked, the vault will get deployed but then you cannot go back and update it to enable it programmatically. In the following link it says that you use the az backup vault create to create AND update the vault; however, if you re-run the command "az backup vault create --resource-group $resourcegroupname --location "Central US" --name newrvkdb123vault --immutability-state Locked" you get the same error message. If you check the vault properties, immutability is not enabled even though the error message states that it is.
Lastly, there is no "az backup vault update" - if you run the previous command with update instead of create, it fails. See details below:
PS /home/karl> az backup vault update --resource-group $resourcegroupname --location "Central US" --name newrvkdb123vault --immutability-state Locked
'update' is misspelled or not recognized by the system.
https://learn.microsoft.com/en-us/cli/azure/backup/vault?view=azure-cli-latest#az-backup-vault-create