Skip to content

az deployment group what-if does not correctly report on soft deleted Azure Key Vaults #19846

@Gordonby

Description

@Gordonby

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

  1. Create a KV from Bicep/Arm template
  2. Delete the KV in the portal
  3. 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.

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupService AttentionThis issue is responsible by Azure service team.act-identity-squad

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions