From 49bd1f47a20045cf4f32713d40eef0f17c0b2fed Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 19 Jul 2024 18:30:40 -0400 Subject: [PATCH] fmt --- .../mcmCluster/eks-cert-manager/terragrunt.hcl | 16 +++++++++++----- .../vpc/mcmCluster/eks-config/terragrunt.hcl | 18 +++++++++++------- .../vpc/mcmCluster/eks-istio/terragrunt.hcl | 18 +++++++++++------- .../vpc/mcmCluster/eks-loki/terragrunt.hcl | 18 +++++++++++------- .../vpc/mcmCluster/terragrunt.hcl | 14 +++++++++----- 5 files changed, 53 insertions(+), 31 deletions(-) diff --git a/lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl index 7e89b26..a781734 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl @@ -1,3 +1,7 @@ +include "root" { + path = find_in_parent_folders() +} + terraform { source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-cert-mgr.git" extra_arguments "retry_lock" { @@ -10,14 +14,16 @@ dependency "eks" { config_path = "../eks" } dependency "eks-config" { - config_path = "../eks-config" + config_path = "../eks-config" + skip_outputs = true } dependency "eks-istio" { - config_path = "../eks-istio" + config_path = "../eks-istio" + skip_outputs = true } inputs = { - cluster_name = dependency.eks.inputs.cluster_name - profile = dependency.eks.inputs.profile - contact_email = dependency.eks.inputs.creator + cluster_name = dependency.eks.inputs.cluster_name + profile = dependency.eks.inputs.profile + contact_email = dependency.eks.inputs.creator } diff --git a/lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl index c519621..3f4412c 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl @@ -1,16 +1,20 @@ +include "root" { + path = find_in_parent_folders() +} + locals { - tag_costallocation = "census:csvd:platformbaseline" - region = "us-gov-east-1" + tag_costallocation = "census:csvd:platformbaseline" + region = "us-gov-east-1" tags = { - "eks-cluster-name" = "platform-eng-eks-mcm" - "CostAllocation" = "census:csvd:platformbaseline" - "boc:tf_module_version" = "1.0.0" - "boc:created_by" = "terraform" + "eks-cluster-name" = "platform-eng-eks-mcm" + "CostAllocation" = "census:csvd:platformbaseline" + "boc:tf_module_version" = "1.0.0" + "boc:created_by" = "terraform" } } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] diff --git a/lab/us-gov-east-1/vpc/mcmCluster/eks-istio/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/eks-istio/terragrunt.hcl index 4455437..e154735 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/eks-istio/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-istio/terragrunt.hcl @@ -1,5 +1,9 @@ +include "root" { + path = find_in_parent_folders() +} + terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] @@ -10,16 +14,16 @@ dependency "eks" { config_path = "../eks" } dependency "eks-config" { - config_path = "../eks-config" + config_path = "../eks-config" skip_outputs = true } inputs = { - profile = dependency.eks.inputs.profile - cluster_name = dependency.eks.inputs.cluster_name - region = dependency.eks.inputs.region - istio_chart_version = "1.22.1" - istio_version = "1.22.1" + profile = dependency.eks.inputs.profile + cluster_name = dependency.eks.inputs.cluster_name + region = dependency.eks.inputs.region + istio_chart_version = "1.22.1" + istio_version = "1.22.1" } generate "provider-eks" { diff --git a/lab/us-gov-east-1/vpc/mcmCluster/eks-loki/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/eks-loki/terragrunt.hcl index b75f821..96f8a47 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/eks-loki/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-loki/terragrunt.hcl @@ -1,5 +1,9 @@ +include "root" { + path = find_in_parent_folders() +} + terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-loki.git" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-loki.git" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] @@ -10,19 +14,19 @@ dependency "eks" { config_path = "../eks" } dependency "eks-config" { - config_path = "../eks-config" + config_path = "../eks-config" skip_outputs = true } dependency "eks-istio" { - config_path = "../eks-istio" + config_path = "../eks-istio" skip_outputs = true } inputs = { - profile = dependency.eks.inputs.profile - cluster_name = dependency.eks.inputs.cluster_name - oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn - region = dependency.eks.inputs.region + profile = dependency.eks.inputs.profile + cluster_name = dependency.eks.inputs.cluster_name + oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn + region = dependency.eks.inputs.region } generate "provider-eks" { diff --git a/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl b/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl index 6455f13..64fc47c 100644 --- a/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl @@ -2,17 +2,17 @@ locals { # Automatically load _envcommon, cross account and environment common variables # common_vars = read_terragrunt_config("${dirname(find_in_parent_folders())}/_envcommon/common-variables.hcl", "skip-account-if-does-not-exist") // "${get_tfvars_dir()}/${find_in_parent_folders("account.tfvars", "skip-account-if-does-not-exist")}", - + # Automatically load account-level variables (NOTE: In our environment account = environment so there is not separate environment layer) account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl")) - + # Automatically load region-level variables region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl")) - + # Automatically load vpc-level variables # Not applicable in this demo, but including for reference, would be next level of variables and configurations # vpc_vars = read_terragrunt_config(find_in_parent_folders("vpc.hcl", "skip-account-if-does-not-exist")) - + # Extract the variables we need for easy access account_name = local.account_vars.locals.account_name account_id = local.account_vars.locals.aws_account_id @@ -52,7 +52,7 @@ EOF } remote_state { - backend = "s3" + backend = "s3" generate = { path = "backend.tf" if_exists = "overwrite_terragrunt" @@ -70,3 +70,7 @@ inputs = merge( local.account_vars.locals, local.region_vars.locals, ) + +dependency "eks" { + config_path = "./eks" +}