terraform-provider-oci
terraform-provider-oci copied to clipboard
oci_kms_vault immediate deletion
Hello,
According to the documentation, the deletion of a vault puts it into a pending state for a default of 30 days with a minimum of 7 days. During that time, the deletion can still be reversed. I fully understand the reason for this feature, as it avoids accidental loss of (critical) secrets.
However when it comes to Terraform, this is undesired because a vault in a 'pending deletion' state also prevents the deletion of the containing compartment. The result is an 'Error: During deletion, Terraform expected the resource to reach state(s): DELETED, but the service reported unexpected state: ACTIVE.' during terraform destroy, which cannot be resolved. The Terraform state is stuck.
So, my question is: is there a way to have a vault deleted immediately and permanently by using Terraform? For Terraform to be useful/operate correctly, the creation and deletion of all resources should be instant and symmetrical. Azure has a similar feature on its vaults, but still allows immediate deletion if desired.
Thanks a lot.