diff --git a/README.md b/README.md index 607c8be86c..45b06aaeba 100644 --- a/README.md +++ b/README.md @@ -266,6 +266,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf | [subnets](#input\_subnets) | A list of subnets to place the EKS cluster and workers within. | `list(string)` | n/a | yes | | [tags](#input\_tags) | A map of tags to add to all resources. Tags added to launch configuration or templates override these values for ASG Tags only. | `map(string)` | `{}` | no | | [vpc\_id](#input\_vpc\_id) | VPC where the cluster and workers will be deployed. | `string` | n/a | yes | +| [wait\_for\_cluster\_timeout](#wait\_for\_cluster\_timeout) | Allows for a configurable timeout (in seconds) when waiting for a cluster to come up | `number` | `300` | no | | [worker\_additional\_security\_group\_ids](#input\_worker\_additional\_security\_group\_ids) | A list of additional security group ids to attach to worker instances | `list(string)` | `[]` | no | | [worker\_ami\_name\_filter](#input\_worker\_ami\_name\_filter) | Name filter for AWS EKS worker AMI. If not provided, the latest official AMI for the specified 'cluster\_version' is used. | `string` | `""` | no | | [worker\_ami\_name\_filter\_windows](#input\_worker\_ami\_name\_filter\_windows) | Name filter for AWS EKS Windows worker AMI. If not provided, the latest official AMI for the specified 'cluster\_version' is used. | `string` | `""` | no | diff --git a/data.tf b/data.tf index f97692e53e..bc80e74a69 100644 --- a/data.tf +++ b/data.tf @@ -90,7 +90,7 @@ data "http" "wait_for_cluster" { count = var.create_eks && var.manage_aws_auth ? 1 : 0 url = format("%s/healthz", aws_eks_cluster.this[0].endpoint) ca_certificate = base64decode(coalescelist(aws_eks_cluster.this[*].certificate_authority[0].data, [""])[0]) - timeout = 300 + timeout = var.wait_for_cluster_timeout depends_on = [ aws_eks_cluster.this, diff --git a/variables.tf b/variables.tf index 6cb9d20910..b7d560e402 100644 --- a/variables.tf +++ b/variables.tf @@ -387,3 +387,9 @@ variable "workers_egress_cidrs" { type = list(string) default = ["0.0.0.0/0"] } + +variable "wait_for_cluster_timeout" { + description = "A timeout (in seconds) to wait for cluster to be available." + type = number + default = 300 +}