diff --git a/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl index 35e7ada..5ddd584 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl @@ -45,10 +45,33 @@ provider "aws" { Terragrunt = "true" } } - # Only these AWS Account IDs may be operated on by this template allowed_account_ids = ["${local.account_id}"] } + +data "aws_eks_cluster" "cluster" { + name = var.cluster_name +} + +data "aws_eks_cluster_auth" "cluster" { + name = var.cluster_name +} + +provider "kubernetes" { + host = data.aws_eks_cluster.cluster.endpoint + + cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data) + token = data.aws_eks_cluster_auth.cluster.token +} + +provider "helm" { + kubernetes { + host = data.aws_eks_cluster.cluster.endpoint + + cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data) + token = data.aws_eks_cluster_auth.cluster.token + } +} EOF } @@ -60,7 +83,7 @@ remote_state { } config = { bucket = "tg-infrastructure-tf-state-lab-dev-ew-us-gov-east-1" - key = "${local.project_number}/${local.project_name}/terraform.tfstate" + key = "${local.project_number}/${local.project_name}/${local.project_role}/terraform.tfstate" region = local.region_vars.locals.aws_region encrypt = true dynamodb_table = "tf_remote_state" @@ -68,8 +91,6 @@ remote_state { } inputs = merge( - # local.common_vars.locals, local.account_vars.locals, local.region_vars.locals, - # local.vpc_vars.locals, )