Skip to content

Commit ecda27f

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

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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)