Skip to content

Commit

Permalink
Force clear members if iam_binding doesn't find a binding
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
slevenick authored and modular-magician committed Oct 16, 2019
1 parent 66e689a commit a05a971
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions google/resource_iam_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func resourceIamBindingRead(newUpdaterFunc newResourceIamUpdaterFunc) schema.Rea
if binding == nil {
log.Printf("[DEBUG]: Binding for role %q not found in policy for %s, assuming it has no members.", eBinding.Role, updater.DescribeResource())
d.Set("role", eBinding.Role)
d.Set("members", nil)
return nil
} else {
d.Set("role", binding.Role)
Expand Down

0 comments on commit a05a971

Please sign in to comment.