From 5899b9e34e264a1f2714e2d88b6a5d6874a54ea6 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 23 Oct 2023 09:22:48 -0700 Subject: [PATCH] Fix google_iam_deny_policy tests (#9321) (#6557) [upstream:6c5551f3d1e0cd9ab6c17ce003a4c0bd6f4f565b] Signed-off-by: Modular Magician --- .changelog/9321.txt | 3 +++ .../iam2/resource_iam_deny_policy_generated_test.go | 4 ++-- google-beta/services/iam2/resource_iam_deny_policy_test.go | 6 +++--- website/docs/r/iam_deny_policy.html.markdown | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .changelog/9321.txt diff --git a/.changelog/9321.txt b/.changelog/9321.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/9321.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/services/iam2/resource_iam_deny_policy_generated_test.go b/google-beta/services/iam2/resource_iam_deny_policy_generated_test.go index d76f54aaa6..fa3a4439c4 100644 --- a/google-beta/services/iam2/resource_iam_deny_policy_generated_test.go +++ b/google-beta/services/iam2/resource_iam_deny_policy_generated_test.go @@ -79,7 +79,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] } } rules { @@ -90,7 +90,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] exception_principals = ["principal://iam.googleapis.com/projects/-/serviceAccounts/${google_service_account.test-account.email}"] } } diff --git a/google-beta/services/iam2/resource_iam_deny_policy_test.go b/google-beta/services/iam2/resource_iam_deny_policy_test.go index 50f27ddcac..f88fe55369 100644 --- a/google-beta/services/iam2/resource_iam_deny_policy_test.go +++ b/google-beta/services/iam2/resource_iam_deny_policy_test.go @@ -112,7 +112,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] } } rules { @@ -123,7 +123,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] exception_principals = ["principal://iam.googleapis.com/projects/-/serviceAccounts/${google_service_account.test-account.email}"] } } @@ -160,7 +160,7 @@ resource "google_iam_deny_policy" "example" { location = "/some/file" description = "A denial condition" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] } } } diff --git a/website/docs/r/iam_deny_policy.html.markdown b/website/docs/r/iam_deny_policy.html.markdown index dc87f9014f..6631d8022c 100644 --- a/website/docs/r/iam_deny_policy.html.markdown +++ b/website/docs/r/iam_deny_policy.html.markdown @@ -51,7 +51,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] } } rules { @@ -62,7 +62,7 @@ resource "google_iam_deny_policy" "example" { title = "Some expr" expression = "!resource.matchTag('12345678/env', 'test')" } - denied_permissions = ["cloudresourcemanager.googleapis.com/projects.delete"] + denied_permissions = ["cloudresourcemanager.googleapis.com/projects.update"] exception_principals = ["principal://iam.googleapis.com/projects/-/serviceAccounts/${google_service_account.test-account.email}"] } }