fix: Update the access entry creation to latest from the parent repo #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Update the access entry creation to latest from the parent repo so entries without policy_associations work (e.g. when type is "EC2_LINUX")
Motivation and Context
Access Entries that are defined only get populated if the
policy_associations
block is defined. This is due to the to looping over thelocal.flattened_access_entries
to create theaws_eks_access_entry
resources. This was fixed in the parent module repo in this PR and I think it should be ported here for anyone that is doing the migration from v19.21.0 to v20.0.0I discovered the problem when trying to add an entry for our Karpenter instances (which we manage outside of the EKS module). Adding a similar block like this to the
access_entries
parameter had no affect.How Has This Been Tested?
I forked this repo and copied the needed changes into main.tf then updated the module source in the my terraform code. I was able to create an access entry that used type "EC2_LINUX" and a blank policy association.