Skip to content

Commit

Permalink
Remove use of google_kms_crypto_key_iam_binding resource in tests, …
Browse files Browse the repository at this point in the history
…to make tests stable in overnight testing (#9621) (#617)

* Remove `google_kms_crypto_key_iam_binding` resources that affect shared crypto keys

* Remove unnecessary use of `google_kms_crypto_key_iam_binding` (no shared crypto key affected)

By removing this usage of `google_kms_crypto_key_iam_binding` I intend to make it easier to identify when acc tests affect shared resources that aren't provisioned by the test

* Remove unnecessary use of `google_kms_crypto_key_iam_binding` (no shared crypto key affected)

* Fix call to config function in acc test

* Update mmv1/third_party/terraform/services/cloudfunctions/resource_cloudfunctions_function_test.go.erb

* Skip `TestAccCloudFunctionsFunction_cmek` in VCR
[upstream:b4195a644bc0aaba2197195d3b8d472969c6a469]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Dec 12, 2023
1 parent 2dd14eb commit 2b3bccc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions secure_source_manager_instance_cmek/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ resource "google_kms_crypto_key" "crypto_key" {
key_ring = google_kms_key_ring.key_ring.id
}

resource "google_kms_crypto_key_iam_binding" "crypto_key_binding" {
resource "google_kms_crypto_key_iam_member" "crypto_key_binding" {
crypto_key_id = google_kms_crypto_key.crypto_key.id
role = "roles/cloudkms.cryptoKeyEncrypterDecrypter"

members = [
"serviceAccount:service-${data.google_project.project.number}@gcp-sa-sourcemanager.iam.gserviceaccount.com"
]
member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-sourcemanager.iam.gserviceaccount.com"
}

resource "google_secure_source_manager_instance" "default" {
Expand Down

0 comments on commit 2b3bccc

Please sign in to comment.