-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Amazon EKS Cluster OIDC Issuer URL #9995
Comments
I will have the new attributes and an example submitted shortly. 👍 e.g. resource "aws_eks_cluster" "example" {
# ... other configuration ...
}
resource "aws_iam_openid_connect_provider" "example" {
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = []
url = "${aws_eks_cluster.example.identity.0.oidc.0.issuer}"
}
data "aws_iam_policy_document" "example_assume_role_policy" {
statement {
actions = ["sts:AssumeRoleWithWebIdentity"]
effect = "Allow"
condition {
test = "StringEquals"
variable = "${replace(aws_iam_openid_connect_provider.example.url, "https://", "")}:sub"
values = ["system:serviceaccount:kube-system:aws-node"]
}
principals {
identifiers = ["${aws_iam_openid_connect_provider.example.arn}"]
type = "Federated"
}
}
}
resource "aws_iam_role" "example" {
assume_role_policy = "${data.aws_iam_policy_document.example_assume_role_policy.json}"
name = "example"
} |
…nd data source Reference: #9995 Output from acceptance testing: ``` --- PASS: TestAccAWSEksCluster_VpcConfig_SecurityGroupIds (1211.77s) --- PASS: TestAccAWSEksCluster_basic (1234.32s) --- PASS: TestAccAWSEksClusterDataSource_basic (1253.87s) --- PASS: TestAccAWSEksCluster_Logging (1298.73s) --- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPublicAccess (1489.44s) --- PASS: TestAccAWSEksCluster_VpcConfig_EndpointPrivateAccess (1875.19s) --- PASS: TestAccAWSEksCluster_Version (2292.24s) ```
Pull request submitted: #10006 |
Can we please get that reviewed and merge asap ;)? So, I can finally remove kube2iam. |
The functionality to retrieve the OIDC issuer URL from the |
This has been released in version 2.28.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 for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Description
Amazon EKS now allows you to assign IAM permissions to Kubernetes service accounts.
This is achieved via an OIDC Issuer URL exposed on an EKS Cluster.
New or Affected Resource(s)
aws_eks_cluster
Potential Terraform Configuration
References
Announcement.
API reference.
Blog post.
AWS containers roadmap issue.
Requires AWS SDK v1.23.15:
The text was updated successfully, but these errors were encountered: