Skip to content

Commit

Permalink
storage bucket IAM diff suppress (#3324) (#6019)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 31, 2020
1 parent 4009443 commit cbe367e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/3324.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
storage: fixed an issue where `google_storage_bucket_iam_member` showed a diff for bucket self links
```
6 changes: 5 additions & 1 deletion google/iam_storage_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbe367e

Please sign in to comment.