How are people handling KeyVault deletes? When I d...
# azure
How are people handling KeyVault deletes? When I delete my KV it gets soft deleted and when I go to Pulumi up again it detects the old keyvault and complains I need to either purge or restore it. I know the classic provider you could specify what you'd like to do. How have people been handling this?
When I testing, I start with 01 and just increment the number as I go along. This way when I happy with the design, my "permanent" keyvault name is not taken. You can also purge the vault via CLI or PowerShell.
It would be ideal for there to be a delete option in azure-native that includes purging. Purging is a first-class component of the API. App Configs are in the same boat. I've played around with the Local Command package, but there are quirks with it (e.g. it only seems to get registered during a pulumi up, not during a destroy). So I've been running the Az CLI after a destroy, e.g.:
Copy code
((az keyvault list-deleted) | ConvertFrom-Json) | % { az keyvault purge --name $ --location $ };
((az appconfig list-deleted) | ConvertFrom-Json) | % { az appconfig purge --name $ --location $_.location --yes };
❤️ 1