Skip to content

Commit

Permalink
Disable CA deletion related protection in tests (#6907)
Browse files Browse the repository at this point in the history
fixes hashicorp/terraform-provider-google#9999

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician committed Dec 6, 2022
1 parent 9d0408a commit ea6e01c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions privateca_certificate_authority_subordinate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ resource "google_privateca_certificate_authority" "root-ca" {
pool = "ca-pool-${local.name_suffix}"
certificate_authority_id = "my-certificate-authority-${local.name_suffix}-root"
location = "us-central1"
deletion_protection = false
ignore_active_certificates_on_deletion = true
config {
subject_config {
subject {
Expand Down Expand Up @@ -34,6 +32,11 @@ resource "google_privateca_certificate_authority" "root-ca" {
key_spec {
algorithm = "RSA_PKCS1_4096_SHA256"
}

// Disable CA deletion related safe checks for easier cleanup.
deletion_protection = false
skip_grace_period = true
ignore_active_certificates_on_deletion = true
}

resource "google_privateca_certificate_authority" "default" {
Expand Down

0 comments on commit ea6e01c

Please sign in to comment.