Skip to content

Commit a40b85a

Browse files
committed
feat: Switch to dualstack OIDC issuer URL
1 parent f62280d commit a40b85a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/UPGRADE-21.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
3131
- `addons.resolve_conflicts_on_create` is now set to `"NONE"` by default (was `"OVERWRITE"`).
3232
- `addons.most_recent` is now set to `true` by default (was `false`).
3333
- `cluster_identity_providers.issuer_url` is now required to be set by users; the prior incorrect default has been removed. See https://github.com/terraform-aws-modules/terraform-aws-eks/pull/3055 and https://github.com/kubernetes/kubernetes/pull/123561 for more details.
34+
- The OIDC issuer URL for IAM roles for service accounts (IRSA) has been changed to use the new dual stack`oidc-eks` endpoint instead of `oidc.eks`. This is to align with https://github.com/aws/containers-roadmap/issues/2038#issuecomment-2278450601
3435

3536
## Additional changes
3637

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ data "tls_certificate" "this" {
444444
# Not available on outposts
445445
count = local.create_oidc_provider && var.include_oidc_root_ca_thumbprint ? 1 : 0
446446

447-
url = aws_eks_cluster.this[0].identity[0].oidc[0].issuer
447+
url = local.dualstack_oidc_issuer_url
448448
}
449449

450450
resource "aws_iam_openid_connect_provider" "oidc_provider" {
@@ -453,7 +453,7 @@ resource "aws_iam_openid_connect_provider" "oidc_provider" {
453453

454454
client_id_list = distinct(compact(concat(["sts.amazonaws.com"], var.openid_connect_audiences)))
455455
thumbprint_list = concat(local.oidc_root_ca_thumbprint, var.custom_oidc_thumbprints)
456-
url = aws_eks_cluster.this[0].identity[0].oidc[0].issuer
456+
url = local.dualstack_oidc_issuer_url
457457

458458
tags = merge(
459459
{ Name = "${var.name}-eks-irsa" },

outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
locals {
2+
# https://github.com/aws/containers-roadmap/issues/2038#issuecomment-2278450601
23
dualstack_oidc_issuer_url = try(replace(replace(aws_eks_cluster.this[0].identity[0].oidc[0].issuer, "https://oidc.eks.", "https://oidc-eks."), ".amazonaws.com/", ".api.aws/"), null)
34
}
45

0 commit comments

Comments
 (0)