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: Allow "EC2" access entry type for EKS Auto Mode custom node pools #3281

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

vibhamsharma
Copy link
Contributor

@vibhamsharma vibhamsharma commented Jan 20, 2025

While Creating Access entry for Self managed node role, we were getting below error as it seems EC2 type is in exception for policy attachment. Once I removed EC2 from exception condition, it started picking up Policy attachment and Access Entry got created. We need this for creating Access Entry for Node role in EKS Automode.

│ Error: Unsupported attribute

│ on .terraform/modules/eks/main.tf line 289, in resource "aws_eks_access_policy_association" "this":
│ 289: policy_arn = each.value.association_policy_arn
│ ├────────────────
│ │ each.value is object with 3 attributes

│ This object does not have an attribute named "association_policy_arn".

Description

I have removed EC2 from exception list of policy attachment. Once done, it start creating policy attachment for EC2 type access entry which is needed to create Access entry for Self managed Node role in EKS Automode.

Motivation and Context

This is required to create Access Entry for Node role in EKS Automode.

unable to attach access policies to access entries of type EC2 #3274

Breaking Changes

No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects

I have tested it with my EKS Automode cluster created through this EKS module and it created Access Entry Successfully.

  • I have executed pre-commit run -a on my pull request

…y can be done for EC2 type for creating access entry for Node role.

While Creating Access entry for Self managed node role, we were getting below error as it seems EC2 type is included in exception for policy attachment. Once I removed EC2 from exception condition, it started picking up Policy attachment and Access Entry got created.

│ Error: Unsupported attribute
│ 
│   on .terraform/modules/eks/main.tf line 289, in resource "aws_eks_access_policy_association" "this":
│  289:   policy_arn    = each.value.association_policy_arn
│     ├────────────────
│     │ each.value is object with 3 attributes
│ 
│ This object does not have an attribute named "association_policy_arn".
Copy link
Contributor Author

@vibhamsharma vibhamsharma left a comment

Choose a reason for hiding this comment

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

fix: Removed EC2 type from exception condition so policy attachment for access entry can be created for EC2 type for creating access entry for Self managed Node role in EKS Automode.

@vibhamsharma
Copy link
Contributor Author

@bryantbiggs @antonbabenko : Can someone plz review this PR as we are not able to create Access Entry for self managed node role.

@bryantbiggs bryantbiggs changed the title fix: Removed EC2 type from exception condition so policy attachment for access entry can be created for EC2 type for creating access entry for Self managed Node role in EKS Automode. fix: Allow "EC2" access entry type for EKS Auto Mode custom node pools Jan 22, 2025
@bryantbiggs bryantbiggs merged commit 3e2ea83 into terraform-aws-modules:master Jan 22, 2025
25 of 28 checks passed
antonbabenko pushed a commit that referenced this pull request Jan 22, 2025
## [20.33.1](v20.33.0...v20.33.1) (2025-01-22)

### Bug Fixes

* Allow `"EC2"` access entry type for EKS Auto Mode custom node pools ([#3281](#3281)) ([3e2ea83](3e2ea83))
@antonbabenko
Copy link
Member

This PR is included in version 20.33.1 🎉

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.

3 participants