https://pulumi.com logo
#azure
Title
# azure
r

rough-window-15889

05/03/2022, 4:22 PM
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?
c

clean-truck-93285

05/03/2022, 6:37 PM
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. https://docs.microsoft.com/en-us/azure/key-vault/general/key-vault-recovery?tabs=azure-powershell#key-vault-powershell
m

mammoth-agency-10350

05/23/2022, 5:34 PM
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 $_.name --location $_.properties.location };
((az appconfig list-deleted) | ConvertFrom-Json) | % { az appconfig purge --name $_.name --location $_.location --yes };
❤️ 1
8 Views