terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

oci_kms_vault immediate deletion

Open boris-van-hardeveld opened this issue 2 years ago • 0 comments

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.

boris-van-hardeveld avatar Mar 29 '22 19:03 boris-van-hardeveld