feat: Add support for service_ipv4_cidr for the EKS cluster (#1139)

This commit is contained in:
Suresh Kumar Nalluru
2021-01-28 14:14:53 -08:00
committed by GitHub
parent 8978997bb1
commit d48ff6dccb
3 changed files with 11 additions and 0 deletions

View File

@@ -184,6 +184,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
| cluster\_log\_retention\_in\_days | Number of days to retain log events. Default retention - 90 days. | `number` | `90` | no |
| cluster\_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | `string` | n/a | yes |
| 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 |
| cluster\_service\_ipv4\_cidr | service ipv4 cidr for the kubernetes cluster | `string` | `null` | no |
| cluster\_version | Kubernetes version to use for the EKS cluster. | `string` | n/a | yes |
| 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 |
| create\_eks | Controls if EKS resources should be created (it affects almost all resources) | `bool` | `true` | no |

View File

@@ -22,6 +22,10 @@ resource "aws_eks_cluster" "this" {
public_access_cidrs = var.cluster_endpoint_public_access_cidrs
}
kubernetes_network_config {
service_ipv4_cidr = var.cluster_service_ipv4_cidr
}
timeouts {
create = var.cluster_create_timeout
delete = var.cluster_delete_timeout

View File

@@ -369,3 +369,9 @@ variable "fargate_pod_execution_role_name" {
type = string
default = null
}
variable "cluster_service_ipv4_cidr" {
description = "service ipv4 cidr for the kubernetes cluster"
type = string
default = null
}