Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(acm)!: prevent conflicts in IAM binding #1576

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

evenh
Copy link
Contributor

@evenh evenh commented Mar 2, 2023

When using both config sync and policy controller the existing binding resources conflicts with each other and causes a constant diff.

This PR will cause a diff in existing configurations, but when applying it should actually apply the the binding to both members resulting in the intended outcome and no further diffs.

@evenh evenh requested review from a team, Jberlinsky and ericyz as code owners March 2, 2023 08:57
@google-cla
Copy link

google-cla bot commented Mar 2, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@apeabody
Copy link
Collaborator

apeabody commented Mar 2, 2023

/gcbrun

@apeabody apeabody self-assigned this Mar 2, 2023
@apeabody
Copy link
Collaborator

apeabody commented Mar 2, 2023

Thanks for the contribution @evenh, relevant output from LINT:

Running terraform fmt
modules/acm/creds.tf
--- old/modules/acm/creds.tf
+++ new/modules/acm/creds.tf
@@ -44,7 +44,7 @@
   role               = "roles/iam.workloadIdentityUser"
 
   members = [
-    for ksa in local.iam_ksa_binding_members :"serviceAccount:${var.project_id}.svc.id.goog[${ksa}]"
+    for ksa in local.iam_ksa_binding_members : "serviceAccount:${var.project_id}.svc.id.goog[${ksa}]"
   ]
 
   depends_on = [google_gke_hub_feature_membership.main]
Error: terraform fmt failed with exit code 3

When using both config sync and policy controller the existing binding
resources conflicts with each other and causes a constant diff.
@evenh evenh force-pushed the fix-ksa-binding branch from 9a2e5f8 to bbc628a Compare March 2, 2023 18:08
@apeabody
Copy link
Collaborator

apeabody commented Mar 2, 2023

/gcbrun

@apeabody
Copy link
Collaborator

apeabody commented Mar 2, 2023

My suspicion is the failing INT is unrelated.

@evenh
Copy link
Contributor Author

evenh commented Mar 3, 2023

I don't have insight into the integration tests but I hope it is unrelated

@apeabody
Copy link
Collaborator

apeabody commented Mar 3, 2023

re-triggering CI

@apeabody apeabody changed the title acm: prevent conflicts in IAM binding fix(acm): prevent conflicts in IAM binding Mar 3, 2023
Copy link
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @evenh!

@apeabody apeabody changed the title fix(acm): prevent conflicts in IAM binding fix(acm)!: prevent conflicts in IAM binding Mar 3, 2023
@apeabody apeabody merged commit a7cfe92 into terraform-google-modules:master Mar 3, 2023
@evenh evenh deleted the fix-ksa-binding branch March 8, 2023 09:31
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants