mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-25 19:01:04 +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
@@ -64,7 +64,7 @@ locals {
|
||||
|
||||
resource "kubernetes_config_map" "aws_auth" {
|
||||
count = var.create_eks && var.manage_aws_auth ? 1 : 0
|
||||
depends_on = [null_resource.wait_for_cluster[0]]
|
||||
depends_on = [data.http.wait_for_cluster[0]]
|
||||
|
||||
metadata {
|
||||
name = "aws-auth"
|
||||
@@ -72,7 +72,7 @@ resource "kubernetes_config_map" "aws_auth" {
|
||||
labels = merge(
|
||||
{
|
||||
"app.kubernetes.io/managed-by" = "Terraform"
|
||||
# / are replaced by . because label validator fails in this lib
|
||||
# / are replaced by . because label validator fails in this lib
|
||||
# https://github.com/kubernetes/apimachinery/blob/1bdd76d09076d4dc0362456e59c8f551f5f24a72/pkg/util/validation/validation.go#L166
|
||||
"terraform.io/module" = "terraform-aws-modules.eks.aws"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user