Skip to content

Commit e05506a

Browse files
committed
feat: setting oidc issuer as default option for aws_eks_identity_provider_config
1 parent 58285f3 commit e05506a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

examples/complete/main.tf

+7
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ module "eks" {
196196
}
197197
}
198198

199+
# OIDC Identity provider
200+
cluster_identity_providers = {
201+
sts = {
202+
client_id = "sts.amazonaws.com"
203+
}
204+
}
205+
199206
# aws-auth configmap
200207
manage_aws_auth_configmap = true
201208

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ resource "aws_eks_identity_provider_config" "this" {
369369
groups_claim = lookup(each.value, "groups_claim", null)
370370
groups_prefix = lookup(each.value, "groups_prefix", null)
371371
identity_provider_config_name = try(each.value.identity_provider_config_name, each.key)
372-
issuer_url = each.value.issuer_url
372+
issuer_url = try(each.value.issuer_url, aws_eks_cluster.this[0].identity[0].oidc[0].issuer)
373373
required_claims = lookup(each.value, "required_claims", null)
374374
username_claim = lookup(each.value, "username_claim", null)
375375
username_prefix = lookup(each.value, "username_prefix", null)

0 commit comments

Comments
 (0)