From dbced43d01c4b3b5b37586f2e23d599b2ee4ee25 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Wed, 9 Oct 2024 20:12:52 -0400 Subject: [PATCH 1/3] updates after merge --- .../eks-dns/terragrunt.hcl | 5 +- .../eks-istio/terragrunt.hcl | 2 +- .../eks-karpenter/terragrunt.hcl | 2 +- .../eks-tempo/terragrunt.hcl | 5 +- .../platform-eng-eks-mcm/eks/terragrunt.hcl | 68 ++++++++++++++++--- .../vpc/platform-test-x/eks/terragrunt.hcl | 6 +- lab/terragrunt.hcl | 50 +------------- 7 files changed, 71 insertions(+), 67 deletions(-) diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl index 46d26d8..17923b6 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-dns.git" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-dns.git?ref=feature-dns-ingress" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] @@ -14,7 +14,8 @@ terraform { dependency "eks" { config_path = "../eks" mock_outputs = { - zone_ids = ["Z12345678CA5FV1LIFBC5"] + subnets = ["subnet-abcdefgh", "subnet-12345678", "subnet-ab12cd34"] + vpc_id = "vpc-abcdefgh01234567" } } diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl index 5a30c0e..0651764 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=main" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=feature-nlb-dns" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl index 982e1d7..aca642f 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git?ref=main" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git?ref=k106" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-tempo/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-tempo/terragrunt.hcl index eaf268b..b6f5664 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-tempo/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-tempo/terragrunt.hcl @@ -32,8 +32,9 @@ dependency "eks-prometheus" { } inputs = { - profile = include.root.inputs.aws_profile - region = include.root.inputs.aws_region + account_id = include.root.locals.account_id + profile = include.root.locals.aws_profile + region = include.root.locals.aws_region cluster_name = dependency.eks.outputs.cluster_name oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn prometheus_port = dependency.eks-prometheus.outputs.prometheus_server_internal_endpoint.port_number diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks/terragrunt.hcl index a90d330..1b22463 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks/terragrunt.hcl @@ -6,22 +6,26 @@ include "root" { locals { # Set cluster/platform specific variables, or extract from the hierarchy. account_id = include.root.inputs.aws_account_id - vpc_name = include.root.inputs.vpc_name + cluster_endpoint_public_access = true cluster_name = "platform-eng-eks-mcm" cluster_version = "1.30" - vpc_domain_name = include.root.inputs.vpc_domain_name + creator = "matthew.c.morgan@census.gov" eks_instance_disk_size = 100 - eks_vpc_name = include.root.inputs.vpc_name eks_ng_desired_size = 2 eks_ng_max_size = 10 - eks_ng_min_size = 2 - eks_vpc_name = "vpc3-lab-dev" + eks_ng_min_size = 0 + eks_vpc_name = include.root.inputs.vpc_name enable_cluster_creator_admin_permissions = true - cluster_endpoint_public_access = true + environment_abbr = include.root.inputs.environment_abbr + organization = include.root.inputs.organization profile = include.root.inputs.aws_profile + project_name = include.root.inputs.project_name + project_number = include.root.inputs.project_number + project_role = include.root.inputs.project_role region = include.root.inputs.aws_region - cluster_mailing_list = "matthew.c.morgan@census.gov" - environment_abbr = include.root.inputs.environment_abbr + terraform = true + terragrunt = true + vpc_domain_name = include.root.inputs.vpc_domain_name # Tags applied to AWS objects created tags = { @@ -39,19 +43,61 @@ terraform { } } +# Generate an AWS provider block +generate "provider" { + path = "provider.tf" + if_exists = "overwrite_terragrunt" + contents = < Date: Thu, 10 Oct 2024 01:37:20 -0400 Subject: [PATCH 2/3] istio deps --- .../vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl index 17923b6..5809fe2 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl @@ -19,8 +19,16 @@ dependency "eks" { } } +dependency "istio" { + config_path = "../eks-istio" + mock_outputs = { + istio_namespace = "istio-namespace" + } +} + inputs = { cluster_name = dependency.eks.inputs.cluster_name + istio_namespace = dependency.istio.outputs.istio_namespace profile = include.root.inputs.aws_profile region = include.root.inputs.aws_region subnets = dependency.eks.outputs.subnets From 6dfdfc54ee162c83eb2047ec7988078d1ec7a2cc Mon Sep 17 00:00:00 2001 From: Matthew Creal Morgan Date: Wed, 9 Oct 2024 22:42:29 -0700 Subject: [PATCH 3/3] Apply suggestions from code review --- .../vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl | 2 +- .../vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl | 2 +- .../vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl index 5809fe2..01c08b2 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-dns/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-dns.git?ref=feature-dns-ingress" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-dns.git" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl index 0651764..d1c79b8 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-istio/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=feature-nlb-dns" + 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"] diff --git a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl index aca642f..a6e5264 100644 --- a/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/eks-karpenter/terragrunt.hcl @@ -4,7 +4,7 @@ include "root" { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git?ref=k106" + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"]