Skip to content

Commit d48ff6d

Browse files
authored
feat: Add support for service_ipv4_cidr for the EKS cluster (#1139)
1 parent 8978997 commit d48ff6d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
184184
| cluster\_log\_retention\_in\_days | Number of days to retain log events. Default retention - 90 days. | `number` | `90` | no |
185185
| cluster\_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | `string` | n/a | yes |
186186
| cluster\_security\_group\_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingress/egress to work with the workers | `string` | `""` | no |
187+
| cluster\_service\_ipv4\_cidr | service ipv4 cidr for the kubernetes cluster | `string` | `null` | no |
187188
| cluster\_version | Kubernetes version to use for the EKS cluster. | `string` | n/a | yes |
188189
| config\_output\_path | Where to save the Kubectl config file (if `write_kubeconfig = true`). Assumed to be a directory if the value ends with a forward slash `/`. | `string` | `"./"` | no |
189190
| create\_eks | Controls if EKS resources should be created (it affects almost all resources) | `bool` | `true` | no |

cluster.tf

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ resource "aws_eks_cluster" "this" {
2222
public_access_cidrs = var.cluster_endpoint_public_access_cidrs
2323
}
2424

25+
kubernetes_network_config {
26+
service_ipv4_cidr = var.cluster_service_ipv4_cidr
27+
}
28+
2529
timeouts {
2630
create = var.cluster_create_timeout
2731
delete = var.cluster_delete_timeout

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -369,3 +369,9 @@ variable "fargate_pod_execution_role_name" {
369369
type = string
370370
default = null
371371
}
372+
373+
variable "cluster_service_ipv4_cidr" {
374+
description = "service ipv4 cidr for the kubernetes cluster"
375+
type = string
376+
default = null
377+
}

0 commit comments

Comments
 (0)