You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating KeyVault Resources named via this module I've run into an issue where a mistake was made (by me) requiring deletion of the resource. We're using Purge Protection on KeyVaults so when one is deleted in Azure I can't create another KeyVault using the same name, at least not for 90 days, which would slow down development quite a bit.
Here's what I'm doing:
KeyVault is created using name = join("-", [module.naming.key_vault.slug, lower(each.key), module.naming.random])
Notice something is b0rk3d so I need to tear everything down.
Delete the KeyVault from Azure.
Delete it from the Terraform State File.
Run terraform apply
The result is Terraform attempts to create a KeyVault using same name (same "random" ending characters in name), which throws an error stating the KeyVault already exists.
I've been working around it by restoring the KeyVault and importing the Resource into Terraform state.
I'd much rather the replacement KeyVault Resource be created by Terraform with a new unique name instead.
What is the proper way to make this happen?
The text was updated successfully, but these errors were encountered:
When creating KeyVault Resources named via this module I've run into an issue where a mistake was made (by me) requiring deletion of the resource. We're using Purge Protection on KeyVaults so when one is deleted in Azure I can't create another KeyVault using the same name, at least not for 90 days, which would slow down development quite a bit.
Here's what I'm doing:
name = join("-", [module.naming.key_vault.slug, lower(each.key), module.naming.random])
terraform apply
The result is Terraform attempts to create a KeyVault using same name (same "random" ending characters in name), which throws an error stating the KeyVault already exists.
I've been working around it by restoring the KeyVault and importing the Resource into Terraform state.
I'd much rather the replacement KeyVault Resource be created by Terraform with a new unique name instead.
What is the proper way to make this happen?
The text was updated successfully, but these errors were encountered: