Describe the bug
A bug or a "feature"? Regardless, makes az keyvault create rather unsafe.
When we run az keyvault create --name=EXISTING_VAULT and EXISTING_VAULT does exist, the command succeeds. However, any access policy set up in that vault is now gone and has to be recreated again.
The az keyvault create --name=EXISTING_VAULT does not produce any warning. Neither it does allow to fail is vault already exists.
To Reproduce
- Run
az keyvault create --name=EXISTING_VAULT
- Set up extensive access policy on it in Azure Portal.
- Run
az keyvault create --name=EXISTING_VAULT again.
- Observe in Azure Portal the policy is now all gone and is now in default state.
Expected behavior
- Subsequent runs of
az keyvault create --name=EXISTING_VAULT preserve all settings unless these differ as supplied by command line parameters. All access policies should be preserved. Essentially, this should be "don't change anything unless told" and should be safe to run at any times with the same command line args.
Environment summary
brew on OS X:
az --version
azure-cli (2.0.48)
Describe the bug
A bug or a "feature"? Regardless, makes
az keyvault createrather unsafe.When we run
az keyvault create --name=EXISTING_VAULTandEXISTING_VAULTdoes exist, the command succeeds. However, any access policy set up in that vault is now gone and has to be recreated again.The
az keyvault create --name=EXISTING_VAULTdoes not produce any warning. Neither it does allow to fail is vault already exists.To Reproduce
az keyvault create --name=EXISTING_VAULTaz keyvault create --name=EXISTING_VAULTagain.Expected behavior
az keyvault create --name=EXISTING_VAULTpreserve all settings unless these differ as supplied by command line parameters. All access policies should be preserved. Essentially, this should be "don't change anything unless told" and should be safe to run at any times with the same command line args.Environment summary
brew on OS X: