-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New Key Vault creation fails due to purge protection validation error #32311
Copy link
Copy link
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure Deploymentsaz deployment/bicep/stack/deployment-scripts/ts/group exportaz deployment/bicep/stack/deployment-scripts/ts/group exportPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure Deploymentsaz deployment/bicep/stack/deployment-scripts/ts/group exportaz deployment/bicep/stack/deployment-scripts/ts/group exportPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
When creating new Key Vault with a name that does not exist, the deployment using az cli fails due to error. I am using Bicep and I am setting the
enablePurgeProtectiontofalse. Previously, I have set it totruefor a vault with different name in the same resource group.Related command
az deployment group create --resource-group <rg> --parameters <path-to-bicepparam>Errors
The property \"enablePurgeProtection\" cannot be set to false. Enabling the purge protection for a vault is an irreversible action.Issue script & Debug output
Part of the ARM json:
Expected behavior
I am able to create Key Vault with unused name and disabled purge protection.
Environment Summary
azure-cli 2.78.0
core 2.78.0
telemetry 1.1.0
Extensions:
azure-iot 0.21.5
Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users<username>.azure'
Extensions directory 'C:\Users<username>.azure\cliextensions'
Python (Windows) 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response