Skip to content

Commit c1087a0

Browse files
authored
Add Service IPv4 CIDR to output (#227)
1 parent 00b9b1a commit c1087a0

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<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>
77
<!-- markdownlint-restore -->
88

9-
109
<!--
1110
1211
@@ -471,6 +470,7 @@ Available targets:
471470
| <a name="output_eks_cluster_id"></a> [eks\_cluster\_id](#output\_eks\_cluster\_id) | The name of the cluster |
472471
| <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 |
473472
| <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 |
473+
| <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. |
474474
| <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. |
475475
| <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. |
476476
| <a name="output_eks_cluster_role_arn"></a> [eks\_cluster\_role\_arn](#output\_eks\_cluster\_role\_arn) | ARN of the EKS cluster IAM role |

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
| <a name="output_eks_cluster_id"></a> [eks\_cluster\_id](#output\_eks\_cluster\_id) | The name of the cluster |
126126
| <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 |
127127
| <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 |
128+
| <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. |
128129
| <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. |
129130
| <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. |
130131
| <a name="output_eks_cluster_role_arn"></a> [eks\_cluster\_role\_arn](#output\_eks\_cluster\_role\_arn) | ARN of the EKS cluster IAM role |

outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ output "eks_cluster_role_arn" {
4646
value = local.eks_service_role_arn
4747
}
4848

49+
output "eks_cluster_ipv4_service_cidr" {
50+
description = <<-EOT
51+
The IPv4 CIDR block that Kubernetes pod and service IP addresses are assigned from
52+
if `kubernetes_network_ipv6_enabled` is set to false. If set to true this output will be null.
53+
EOT
54+
value = one(aws_eks_cluster.default[*].kubernetes_network_config[0].service_ipv4_cidr)
55+
}
56+
4957
output "eks_cluster_ipv6_service_cidr" {
5058
description = <<-EOT
5159
The IPv6 CIDR block that Kubernetes pod and service IP addresses are assigned from

0 commit comments

Comments
 (0)