Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 72668ac

Browse files
authoredAug 9, 2024··
feat: Add new output values for OIDC issuer URL and provider that are dual-stack compatible (#3120)
* feat: Add new output values for OIDC issuer URL and provider that support IPv4/IPv6 dualstack * chore: Revert addition of `dualstack_oidc_provider` * fix: Add check for `aws` partition since this is the only partition currently supported * fix: Revert partition conditional logic
1 parent faa42df commit 72668ac

File tree

12 files changed

+40
-0
lines changed

12 files changed

+40
-0
lines changed
 

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
335335
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
336336
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
337337
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
338+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
338339
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
339340
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
340341
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎examples/karpenter/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ No inputs.
136136
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
137137
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
138138
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
139+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
139140
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
140141
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
141142
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎examples/karpenter/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ output "cluster_oidc_issuer_url" {
3232
value = module.eks.cluster_oidc_issuer_url
3333
}
3434

35+
output "cluster_dualstack_oidc_issuer_url" {
36+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
37+
value = module.eks.cluster_dualstack_oidc_issuer_url
38+
}
39+
3540
output "cluster_platform_version" {
3641
description = "Platform version for the cluster"
3742
value = module.eks.cluster_platform_version

‎examples/outposts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ terraform destroy --auto-approve
9090
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
9191
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
9292
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
93+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
9394
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
9495
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
9596
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎examples/outposts/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ output "cluster_oidc_issuer_url" {
3232
value = module.eks.cluster_oidc_issuer_url
3333
}
3434

35+
output "cluster_dualstack_oidc_issuer_url" {
36+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
37+
value = module.eks.cluster_dualstack_oidc_issuer_url
38+
}
39+
3540
output "cluster_platform_version" {
3641
description = "Platform version for the cluster"
3742
value = module.eks.cluster_platform_version

‎outputs.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
locals {
2+
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)
3+
}
4+
15
################################################################################
26
# Cluster
37
################################################################################
@@ -52,6 +56,11 @@ output "cluster_oidc_issuer_url" {
5256
value = try(aws_eks_cluster.this[0].identity[0].oidc[0].issuer, null)
5357
}
5458

59+
output "cluster_dualstack_oidc_issuer_url" {
60+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
61+
value = local.dualstack_oidc_issuer_url
62+
}
63+
5564
output "cluster_version" {
5665
description = "The Kubernetes version for the cluster"
5766
value = try(aws_eks_cluster.this[0].version, null)

‎tests/eks-managed-node-group/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ No inputs.
6565
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
6666
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
6767
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
68+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
6869
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
6970
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
7071
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎tests/eks-managed-node-group/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ output "cluster_oidc_issuer_url" {
3232
value = module.eks.cluster_oidc_issuer_url
3333
}
3434

35+
output "cluster_dualstack_oidc_issuer_url" {
36+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
37+
value = module.eks.cluster_dualstack_oidc_issuer_url
38+
}
39+
3540
output "cluster_platform_version" {
3641
description = "Platform version for the cluster"
3742
value = module.eks.cluster_platform_version

‎tests/fargate-profile/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ No inputs.
5656
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
5757
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
5858
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
59+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
5960
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
6061
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
6162
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎tests/fargate-profile/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ output "cluster_oidc_issuer_url" {
3232
value = module.eks.cluster_oidc_issuer_url
3333
}
3434

35+
output "cluster_dualstack_oidc_issuer_url" {
36+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
37+
value = module.eks.cluster_dualstack_oidc_issuer_url
38+
}
39+
3540
output "cluster_platform_version" {
3641
description = "Platform version for the cluster"
3742
value = module.eks.cluster_platform_version

‎tests/self-managed-node-group/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ No inputs.
6161
| <a name="output_cluster_addons"></a> [cluster\_addons](#output\_cluster\_addons) | Map of attribute maps for all EKS cluster addons enabled |
6262
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster |
6363
| <a name="output_cluster_certificate_authority_data"></a> [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
64+
| <a name="output_cluster_dualstack_oidc_issuer_url"></a> [cluster\_dualstack\_oidc\_issuer\_url](#output\_cluster\_dualstack\_oidc\_issuer\_url) | Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider |
6465
| <a name="output_cluster_endpoint"></a> [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for your Kubernetes API server |
6566
| <a name="output_cluster_iam_role_arn"></a> [cluster\_iam\_role\_arn](#output\_cluster\_iam\_role\_arn) | IAM role ARN of the EKS cluster |
6667
| <a name="output_cluster_iam_role_name"></a> [cluster\_iam\_role\_name](#output\_cluster\_iam\_role\_name) | IAM role name of the EKS cluster |

‎tests/self-managed-node-group/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ output "cluster_oidc_issuer_url" {
3232
value = module.eks.cluster_oidc_issuer_url
3333
}
3434

35+
output "cluster_dualstack_oidc_issuer_url" {
36+
description = "Dual-stack compatible URL on the EKS cluster for the OpenID Connect identity provider"
37+
value = module.eks.cluster_dualstack_oidc_issuer_url
38+
}
39+
3540
output "cluster_platform_version" {
3641
description = "Platform version for the cluster"
3742
value = module.eks.cluster_platform_version

0 commit comments

Comments
 (0)
Please sign in to comment.