Skip to content

Commit

Permalink
Force clear members if iam_binding doesn't find a binding for the giv…
Browse files Browse the repository at this point in the history
…en role
  • Loading branch information
slevenick committed Oct 16, 2019
1 parent bb4342d commit 1c59431
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,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 1c59431

Please sign in to comment.