Skip to content

Commit

Permalink
Merge pull request #2790 from abhinavdahiya/gcp_iam_binding_new_value…
Browse files Browse the repository at this point in the history
…_type

Bug 1782583: destroy/gcp/policybinding.go: identity deleted service accounts belonging to the cluster
  • Loading branch information
openshift-merge-robot committed Dec 11, 2019
2 parents 61a4060 + e580a61 commit e261445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/destroy/gcp/policybinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func clearIAMPolicyBindings(policy *resourcemanager.Policy, clusterID string, lo
for _, binding := range policy.Bindings {
members := []string{}
for _, member := range binding.Members {
if strings.HasPrefix(member, fmt.Sprintf("serviceAccount:%s", clusterID)) {
if strings.HasPrefix(strings.TrimPrefix(member, "deleted:"), fmt.Sprintf("serviceAccount:%s", clusterID)) {
logger.Debugf("IAM: removing %s from role %s", member, binding.Role)
removedBindings = true
continue
Expand Down

0 comments on commit e261445

Please sign in to comment.