-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: Correct cluster access entry to create multiple policy associations per access entry #2892
fix: Correct cluster access entry to create multiple policy associations per access entry #2892
Conversation
…licy associations
@@ -168,28 +168,22 @@ locals { | |||
for pol_key, pol_val in lookup(entry_val, "policy_associations", {}) : | |||
merge( | |||
{ | |||
principal_arn = entry_val.principal_arn | |||
kubernetes_groups = lookup(entry_val, "kubernetes_groups", []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubernetes_groups
, tags
, type
, and user_name
are used in the access entry, not in the policy association. So these are not used here and can be removed
) | ||
] | ||
]) | ||
} | ||
|
||
resource "aws_eks_access_entry" "this" { | ||
for_each = { for k, v in local.flattened_access_entries : "${v.entry_key}_${v.pol_key}" => v if local.create } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the issue thats technically breaking, but its not working as intended on v20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is acceptable for a quick-fix release like "5 second rule"
) | ||
] | ||
]) | ||
} | ||
|
||
resource "aws_eks_access_entry" "this" { | ||
for_each = { for k, v in local.flattened_access_entries : "${v.entry_key}_${v.pol_key}" => v if local.create } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is acceptable for a quick-fix release like "5 second rule"
### [20.0.1](v20.0.0...v20.0.1) (2024-02-03) ### Bug Fixes * Correct cluster access entry to create multiple policy associations per access entry ([#2892](#2892)) ([4177913](4177913))
This PR is included in version 20.0.1 🎉 |
I am already using this in production lol. Nevermind my edits, I hadn't checked the diff. Great job! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Motivation and Context
Breaking Changes
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request