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: Update the access entry creation to latest from the parent repo #2

Merged

Conversation

justincbeard
Copy link
Contributor

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 the local.flattened_access_entries to create the aws_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.0

I 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.

access_entries = {
  karpenter_nodes = {
    kubernetes_groups = ["system:nodes"]
    policy_associations = {}
    principal_arn = "arn:aws:iam::012345678901:role/karpenter-node"
    type = "EC2_LINUX"
  }
}

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.

@justincbeard justincbeard changed the title Update the access entry creation to latest from the parent repo fix: Update the access entry creation to latest from the parent repo Mar 4, 2024
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

ah, good catch - thank you!

@bryantbiggs bryantbiggs merged commit 3f626cc into clowdhaus:main Mar 4, 2024
7 of 8 checks passed
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