Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 19, 2024
1 parent 82aa337 commit 49bd1f4
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 31 deletions.
16 changes: 11 additions & 5 deletions lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -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" {
Expand All @@ -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
}
18 changes: 11 additions & 7 deletions lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
18 changes: 11 additions & 7 deletions lab/us-gov-east-1/vpc/mcmCluster/eks-istio/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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" {
Expand Down
18 changes: 11 additions & 7 deletions lab/us-gov-east-1/vpc/mcmCluster/eks-loki/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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" {
Expand Down
14 changes: 9 additions & 5 deletions lab/us-gov-east-1/vpc/mcmCluster/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -52,7 +52,7 @@ EOF
}

remote_state {
backend = "s3"
backend = "s3"
generate = {
path = "backend.tf"
if_exists = "overwrite_terragrunt"
Expand All @@ -70,3 +70,7 @@ inputs = merge(
local.account_vars.locals,
local.region_vars.locals,
)

dependency "eks" {
config_path = "./eks"
}

0 comments on commit 49bd1f4

Please sign in to comment.