Skip to content
This repository was archived by the owner on May 1, 2023. It is now read-only.

Commit cf7b493

Browse files
committed
feat: add OpenID Connect provider outputs
1 parent 255d911 commit cf7b493

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
| certificate\_authority | The certificate-authority-data for your cluster |
2727
| endpoint | The endpoint for your Kubernetes API server |
2828
| name | The name of the cluster |
29+
| open\_id\_connect\_provider\_arn | The Amazon Resource Name (ARN) of the IAM OpenID Connect provider |
30+
| open\_id\_connect\_provider\_issuer | The issuer for OIDC Provider |
2931
| subnet\_ids | The subnets associated with your cluster |
3032
| vpc\_id | The VPC associated with your cluster |
3133

modules/environment/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ No provider.
2121
| certificate\_authority | The certificate-authority-data for your cluster |
2222
| endpoint | The endpoint for your Kubernetes API server |
2323
| name | The name of the cluster |
24+
| open\_id\_connect\_provider\_arn | The Amazon Resource Name (ARN) of the IAM OpenID Connect provider |
25+
| open\_id\_connect\_provider\_issuer | The issuer for OIDC Provider |
2426
| subnet\_ids | The subnets associated with your cluster |
2527
| vpc\_id | The VPC associated with your cluster |
2628

modules/environment/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ output "name" {
1818
value = module.cluster.name
1919
}
2020

21+
output "open_id_connect_provider_arn" {
22+
description = "The Amazon Resource Name (ARN) of the IAM OpenID Connect provider"
23+
value = module.cluster.open_id_connect_provider_arn
24+
}
25+
26+
output "open_id_connect_provider_issuer" {
27+
description = "The issuer for OIDC Provider"
28+
value = module.cluster.open_id_connect_provider_issuer
29+
}
30+
2131
output "subnet_ids" {
2232
description = "The subnets associated with your cluster"
2333
value = module.cluster.subnet_ids

outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ output "name" {
1818
value = data.aws_eks_cluster.this.name
1919
}
2020

21+
output "open_id_connect_provider_arn" {
22+
description = "The Amazon Resource Name (ARN) of the IAM OpenID Connect provider"
23+
24+
value = format(
25+
"arn:aws:iam::%s:oidc-provider/%s",
26+
data.aws_caller_identity.this.account_id,
27+
replace(local.open_id_connect_provider_issuer, "https://", "")
28+
)
29+
}
30+
31+
output "open_id_connect_provider_issuer" {
32+
description = "The issuer for OIDC Provider"
33+
value = local.open_id_connect_provider_issuer
34+
}
35+
2136
output "subnet_ids" {
2237
description = "The subnets associated with your cluster"
2338
value = data.aws_eks_cluster.this.vpc_config[0].subnet_ids

0 commit comments

Comments
 (0)