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

[New Resource]: Add EKS cluster IAM access management API resources #34982

Closed
seifrajhi opened this issue Dec 19, 2023 · 9 comments · Fixed by #35037
Closed

[New Resource]: Add EKS cluster IAM access management API resources #34982

seifrajhi opened this issue Dec 19, 2023 · 9 comments · Fixed by #35037
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/eks Issues and PRs that pertain to the eks service.
Milestone

Comments

@seifrajhi
Copy link

seifrajhi commented Dec 19, 2023

Description

AWS Announced new EKS feature that simplifies controls for IAM cluster access management, and AWS SDK Go v2 has been released including this feature.

As a prerequisite the authenticationMode of the cluster should be either API or API_AND_CONFIG_MAP

Requested Resource(s) and/or Data Source(s)

1- access_entry

resource "access_entry" "foo" {
  cluster_name = "my_cluster"
  iam_principal_arn = "IAM_PRINCIPAL_ARN"
}

2- access_policy_association

resource "access_policy_association" "bar" {
  cluster_name = "my_cluster"
  iam_principal_arn = "IAM_PRINCIPAL_ARN"
  iam_policy_arn = "arn:aws:eks::aws:cluster-access-policy/XXXX"
}

where XXXX = AmazonEKSAdminPolicy , AmazonEKSClusterAdminPolicy , AmazonEKSEditPolicy or AmazonEKSViewPolicy

Potential Terraform Configuration

No response

References

1- Announcement: https://aws.amazon.com/about-aws/whats-new/2023/12/amazon-eks-controls-iam-cluster-access-management/

2- Blog post: https://aws.amazon.com/blogs/containers/a-deep-dive-into-simplified-amazon-eks-access-management-controls/

3- AWS SDK go v2 CHANGELOG: https://github.com/aws/aws-sdk-go-v2/blob/main/service/eks/CHANGELOG.md#v1360-2023-12-18

Would you like to implement a fix?

None

Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 19, 2023
@sidewinder12s
Copy link

Likely also need to update the cluster config resources to support setting the authenticationMode right?

@seifrajhi
Copy link
Author

Hey @sidewinder12s,

Yes, I have mentioned that in the issue description:

As a prerequisite the authenticationMode of the cluster should be either API or API_AND_CONFIG_MAP

@bryantbiggs
Copy link
Contributor

cc @wellsiau-aws / @meetreks - if you want to open the PR now

@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. service/eks Issues and PRs that pertain to the eks service. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 19, 2023
@wellsiau-aws
Copy link
Contributor

@meetreks and @sasidhar-aws is actively working on this

@ewbankkit ewbankkit changed the title [New Resource]: Add IAM cluster access management API resources [New Resource]: Add EKS cluster IAM access management API resources Dec 21, 2023
@gothrek22
Copy link

Access entry requires a lot more params, most of them optional, compared to what's requested here. I.e.:

resource aws_eks_access_entry example {
  iam_role = arn:aws:iam::012345678910:role/MyRole
  username = "my-other-username" (optional)
  kubernetes_groups = "my-other-group" (optional)
  type = "" (optional, options are: 
    EC2_LINUX
    EC2_WINDOWS
    FARGATE_LINUX
    STANDARD
  )
}

As entries for node bootstrap also need to be supported. Same with authenticationMode, which needs a note that it's a one way street if you go from API_AND_CONFIG_MAP to API. And that should be a new optional param within aws_eks_cluster imho. Wit the default of CONFIG_MAP. That way it's backwards compatible.

Here's a good doc on what is covered by this change: aws/containers-roadmap#185 (comment)

@ewbankkit ewbankkit self-assigned this Jan 17, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 17, 2024
@github-actions github-actions bot added this to the v5.33.0 milestone Jan 18, 2024
Copy link

This functionality has been released in v5.33.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@stevehipwell
Copy link

FYI there are comments on #35037 suggesting that this hasn't been implemented correctly.

Copy link

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/eks Issues and PRs that pertain to the eks service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants