Skip to content

Commit

Permalink
Disable CA deletion related protection in tests (#6907) (#13182)
Browse files Browse the repository at this point in the history
fixes #9999

Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Dec 6, 2022
1 parent 7bc52a5 commit 8805cc8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .changelog/6907.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:REPLACEME

```
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ resource "google_privateca_certificate_authority" "root-ca" {
pool = "%{pool_name}"
certificate_authority_id = "tf-test-my-certificate-authority%{random_suffix}-root"
location = "us-central1"
deletion_protection = false
ignore_active_certificates_on_deletion = true
config {
subject_config {
subject {
Expand Down Expand Up @@ -171,6 +169,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
25 changes: 20 additions & 5 deletions google/resource_privateca_certificate_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
certificate_authority_id = "tf-test-my-certificate-authority%{random_suffix}"
location = "us-central1"
pool = "%{pool}"
ignore_active_certificates_on_deletion = true
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -86,6 +84,11 @@ resource "google_privateca_certificate_authority" "test-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" "default" {
Expand Down Expand Up @@ -242,7 +245,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
pool = "%{pool}"
certificate_authority_id = "tf-test-my-certificate-authority%{random_suffix}"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -273,6 +275,11 @@ resource "google_privateca_certificate_authority" "test-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
}
Expand Down Expand Up @@ -321,7 +328,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
pool = "%{pool}"
certificate_authority_id = "tf-test-my-certificate-authority%{random_suffix}"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -352,6 +358,11 @@ resource "google_privateca_certificate_authority" "test-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
}
Expand Down Expand Up @@ -401,7 +412,6 @@ resource "google_privateca_certificate_authority" "authority" {
pool = "%{pool}"
certificate_authority_id = "tf-test-my-authority%{random_suffix}"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -432,6 +442,11 @@ resource "google_privateca_certificate_authority" "authority" {
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
}
Expand Down
25 changes: 20 additions & 5 deletions website/docs/r/privateca_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
certificate_authority_id = "my-certificate-authority"
location = "us-central1"
pool = ""
ignore_active_certificates_on_deletion = true
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -66,6 +64,11 @@ resource "google_privateca_certificate_authority" "test-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" "default" {
Expand Down Expand Up @@ -195,7 +198,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
pool = ""
certificate_authority_id = "my-certificate-authority"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -226,6 +228,11 @@ resource "google_privateca_certificate_authority" "test-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
}
Expand All @@ -247,7 +254,6 @@ resource "google_privateca_certificate_authority" "test-ca" {
pool = ""
certificate_authority_id = "my-certificate-authority"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -278,6 +284,11 @@ resource "google_privateca_certificate_authority" "test-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
}
Expand All @@ -300,7 +311,6 @@ resource "google_privateca_certificate_authority" "authority" {
pool = ""
certificate_authority_id = "my-authority"
location = "us-central1"
deletion_protection = false
config {
subject_config {
subject {
Expand Down Expand Up @@ -331,6 +341,11 @@ resource "google_privateca_certificate_authority" "authority" {
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
}
Expand Down
7 changes: 5 additions & 2 deletions website/docs/r/privateca_certificate_authority.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ resource "google_privateca_certificate_authority" "root-ca" {
pool = "ca-pool"
certificate_authority_id = "my-certificate-authority-root"
location = "us-central1"
deletion_protection = false
ignore_active_certificates_on_deletion = true
config {
subject_config {
subject {
Expand Down Expand Up @@ -137,6 +135,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 8805cc8

Please sign in to comment.