Skip to content

Commit

Permalink
Add Service IPv4 CIDR to output (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
z0rc authored May 14, 2024
1 parent 00b9b1a commit c1087a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<a href="https://github.com/cloudposse/terraform-aws-eks-cluster/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/terraform-aws-eks-cluster.svg?style=for-the-badge" alt="Latest Release"/></a><a href="https://github.com/cloudposse/terraform-aws-eks-cluster/commits"><img src="https://img.shields.io/github/last-commit/cloudposse/terraform-aws-eks-cluster.svg?style=for-the-badge" alt="Last Updated"/></a><a href="https://slack.cloudposse.com"><img src="https://slack.cloudposse.com/for-the-badge.svg" alt="Slack Community"/></a></p>
<!-- markdownlint-restore -->


<!--
Expand Down Expand Up @@ -471,6 +470,7 @@ Available targets:
| <a name="output_eks_cluster_id"></a> [eks\_cluster\_id](#output\_eks\_cluster\_id) | The name of the cluster |
| <a name="output_eks_cluster_identity_oidc_issuer"></a> [eks\_cluster\_identity\_oidc\_issuer](#output\_eks\_cluster\_identity\_oidc\_issuer) | The OIDC Identity issuer for the cluster |
| <a name="output_eks_cluster_identity_oidc_issuer_arn"></a> [eks\_cluster\_identity\_oidc\_issuer\_arn](#output\_eks\_cluster\_identity\_oidc\_issuer\_arn) | The OIDC Identity issuer ARN for the cluster that can be used to associate IAM roles with a service account |
| <a name="output_eks_cluster_ipv4_service_cidr"></a> [eks\_cluster\_ipv4\_service\_cidr](#output\_eks\_cluster\_ipv4\_service\_cidr) | The IPv4 CIDR block that Kubernetes pod and service IP addresses are assigned from<br>if `kubernetes_network_ipv6_enabled` is set to false. If set to true this output will be null. |
| <a name="output_eks_cluster_ipv6_service_cidr"></a> [eks\_cluster\_ipv6\_service\_cidr](#output\_eks\_cluster\_ipv6\_service\_cidr) | The IPv6 CIDR block that Kubernetes pod and service IP addresses are assigned from<br>if `kubernetes_network_ipv6_enabled` is set to true. If set to false this output will be null. |
| <a name="output_eks_cluster_managed_security_group_id"></a> [eks\_cluster\_managed\_security\_group\_id](#output\_eks\_cluster\_managed\_security\_group\_id) | Security Group ID that was created by EKS for the cluster.<br>EKS creates a Security Group and applies it to the ENI that are attached to EKS Control Plane master nodes and to any managed workloads. |
| <a name="output_eks_cluster_role_arn"></a> [eks\_cluster\_role\_arn](#output\_eks\_cluster\_role\_arn) | ARN of the EKS cluster IAM role |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
| <a name="output_eks_cluster_id"></a> [eks\_cluster\_id](#output\_eks\_cluster\_id) | The name of the cluster |
| <a name="output_eks_cluster_identity_oidc_issuer"></a> [eks\_cluster\_identity\_oidc\_issuer](#output\_eks\_cluster\_identity\_oidc\_issuer) | The OIDC Identity issuer for the cluster |
| <a name="output_eks_cluster_identity_oidc_issuer_arn"></a> [eks\_cluster\_identity\_oidc\_issuer\_arn](#output\_eks\_cluster\_identity\_oidc\_issuer\_arn) | The OIDC Identity issuer ARN for the cluster that can be used to associate IAM roles with a service account |
| <a name="output_eks_cluster_ipv4_service_cidr"></a> [eks\_cluster\_ipv4\_service\_cidr](#output\_eks\_cluster\_ipv4\_service\_cidr) | The IPv4 CIDR block that Kubernetes pod and service IP addresses are assigned from<br>if `kubernetes_network_ipv6_enabled` is set to false. If set to true this output will be null. |
| <a name="output_eks_cluster_ipv6_service_cidr"></a> [eks\_cluster\_ipv6\_service\_cidr](#output\_eks\_cluster\_ipv6\_service\_cidr) | The IPv6 CIDR block that Kubernetes pod and service IP addresses are assigned from<br>if `kubernetes_network_ipv6_enabled` is set to true. If set to false this output will be null. |
| <a name="output_eks_cluster_managed_security_group_id"></a> [eks\_cluster\_managed\_security\_group\_id](#output\_eks\_cluster\_managed\_security\_group\_id) | Security Group ID that was created by EKS for the cluster.<br>EKS creates a Security Group and applies it to the ENI that are attached to EKS Control Plane master nodes and to any managed workloads. |
| <a name="output_eks_cluster_role_arn"></a> [eks\_cluster\_role\_arn](#output\_eks\_cluster\_role\_arn) | ARN of the EKS cluster IAM role |
Expand Down
8 changes: 8 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ output "eks_cluster_role_arn" {
value = local.eks_service_role_arn
}

output "eks_cluster_ipv4_service_cidr" {
description = <<-EOT
The IPv4 CIDR block that Kubernetes pod and service IP addresses are assigned from
if `kubernetes_network_ipv6_enabled` is set to false. If set to true this output will be null.
EOT
value = one(aws_eks_cluster.default[*].kubernetes_network_config[0].service_ipv4_cidr)
}

output "eks_cluster_ipv6_service_cidr" {
description = <<-EOT
The IPv6 CIDR block that Kubernetes pod and service IP addresses are assigned from
Expand Down

0 comments on commit c1087a0

Please sign in to comment.