From b3c32bb3279005aad87c2dec423a8a4a2d8735a0 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 31 Mar 2020 22:18:20 +0000 Subject: [PATCH] storage bucket IAM diff suppress (#3324) Signed-off-by: Modular Magician --- .changelog/3324.txt | 3 +++ google/iam_storage_bucket.go | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changelog/3324.txt diff --git a/.changelog/3324.txt b/.changelog/3324.txt new file mode 100644 index 00000000000..360e130a09f --- /dev/null +++ b/.changelog/3324.txt @@ -0,0 +1,3 @@ +```release-note:bug +storage: fixed an issue where `google_storage_bucket_iam_member` showed a diff for bucket self links +``` diff --git a/google/iam_storage_bucket.go b/google/iam_storage_bucket.go index 63a08c7b8d7..2b681e13f90 100644 --- a/google/iam_storage_bucket.go +++ b/google/iam_storage_bucket.go @@ -26,10 +26,14 @@ var StorageBucketIamSchema = map[string]*schema.Schema{ Type: schema.TypeString, Required: true, ForceNew: true, - DiffSuppressFunc: compareSelfLinkOrResourceName, + DiffSuppressFunc: StorageBucketDiffSuppress, }, } +func StorageBucketDiffSuppress(_, old, new string, _ *schema.ResourceData) bool { + return compareResourceNames("", old, new, nil) +} + type StorageBucketIamUpdater struct { bucket string d *schema.ResourceData