az feedback auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
In the scenario where a keyvault has been deleted, and not purged - the what-if analysis predicts a new KeyVault will be created successfully.
In reality, it errors
ERROR: ***"status":"Failed","error":***"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[***"code":"Conflict","message":"***\r\n \"error\": ***\r\n \"code\": \"ConflictError\",\r\n \"message\": \"A vault with the same name already exists in deleted state. You need to either recover or purge existing key vault. Follow this link https://go.microsoft.com/fwlink/?linkid=2149745 for more information on soft delete.\"\r\n
To Reproduce
- Create a KV from Bicep/Arm template
- Delete the KV in the portal
- Run the az deployment group What-If on the Bicep/Arm template
Expected behaviour
An error be reported that the deployment will fail due to the Key Vault still existing in a soft deleted status.
Describe the bug
In the scenario where a keyvault has been deleted, and not purged - the what-if analysis predicts a new KeyVault will be created successfully.
In reality, it errors
ERROR: ***"status":"Failed","error":***"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[***"code":"Conflict","message":"***\r\n \"error\": ***\r\n \"code\": \"ConflictError\",\r\n \"message\": \"A vault with the same name already exists in deleted state. You need to either recover or purge existing key vault. Follow this link https://go.microsoft.com/fwlink/?linkid=2149745 for more information on soft delete.\"\r\nTo Reproduce
Expected behaviour
An error be reported that the deployment will fail due to the Key Vault still existing in a soft deleted status.