mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-21 08:59:02 +01:00
feat: Replace the local-exec script with a http datasource for waiting cluster (#1339)
NOTES: Using the [terraform-aws-modules/http](https://registry.terraform.io/providers/terraform-aws-modules/http/latest) provider is a more platform agnostic way to wait for the cluster availability than using a local-exec. With this change we're able to provision EKS clusters and manage the `aws_auth` configmap while still using the `hashicorp/tfc-agent` docker image.
This commit is contained in:
committed by
GitHub
parent
781f673295
commit
e3bf48bba2
12
variables.tf
12
variables.tf
@@ -205,18 +205,6 @@ variable "cluster_delete_timeout" {
|
||||
default = "15m"
|
||||
}
|
||||
|
||||
variable "wait_for_cluster_cmd" {
|
||||
description = "Custom local-exec command to execute for determining if the eks cluster is healthy. Cluster endpoint will be available as an environment variable called ENDPOINT"
|
||||
type = string
|
||||
default = "for i in `seq 1 60`; do if `command -v wget > /dev/null`; then wget --no-check-certificate -O - -q $ENDPOINT/healthz >/dev/null && exit 0 || true; else curl -k -s $ENDPOINT/healthz >/dev/null && exit 0 || true;fi; sleep 5; done; echo TIMEOUT && exit 1"
|
||||
}
|
||||
|
||||
variable "wait_for_cluster_interpreter" {
|
||||
description = "Custom local-exec command line interpreter for the command to determining if the eks cluster is healthy."
|
||||
type = list(string)
|
||||
default = ["/bin/sh", "-c"]
|
||||
}
|
||||
|
||||
variable "cluster_create_security_group" {
|
||||
description = "Whether to create a security group for the cluster or attach the cluster to `cluster_security_group_id`."
|
||||
type = bool
|
||||
|
||||
Reference in New Issue
Block a user