From b02a74ceae92634bbc709579255a3d88d9c1b466 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Tue, 13 May 2025 17:52:20 -0400 Subject: [PATCH] add prefixes --- lab/_envcommon/prefixes.hcl | 37 +++++++++++++++++++ .../eks-pipeline/terragrunt.hcl | 18 +++++---- 2 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 lab/_envcommon/prefixes.hcl diff --git a/lab/_envcommon/prefixes.hcl b/lab/_envcommon/prefixes.hcl new file mode 100644 index 0000000..d46f6bb --- /dev/null +++ b/lab/_envcommon/prefixes.hcl @@ -0,0 +1,37 @@ +locals { + prefixes = { + "ebs" = "v-ebs-" + "efs" = "v-efs-" + "group" = "g-" + "kms" = "k-kms-" + "policy" = "p-" + "role" = "r-" + "s3" = "v-s3-" + "security-group" = "" # "sg-" + # VPC + "customer-gateway" = "cgw-" + "dhcp-options" = "" + "elastic-ip" = "eip-" + "internet-gateway" = "igw-" + "log-group" = "lg-" + "log-stream" = "lgs-" + "nat-gateway" = "nat-" + "network-acl" = "nacl-" + "route-table" = "route-" + "subnet" = "" + "vpc-endpoint" = "vpce-" + "vpc-peer" = "vpcp-" + "vpc" = "" + "vpn-connection" = "vpn_" + "vpn-gateway" = "vpcg-" + # EKS + "eks-policy" = "p-eks-" + "eks-queue" = "eks-q-" + "eks-role" = "r-eks-" + "eks-s3" = "v-s3-eks-" + "eks-security-group" = "eks-sg-" # "sg-eks-" + "eks-user" = "s-eks-" + "eks" = "eks-" + "eks-event" = "eks-ev-" + } +} diff --git a/lab/development/us-gov-east-1/vpc/csvd-platform-lab-mcm/eks-pipeline/terragrunt.hcl b/lab/development/us-gov-east-1/vpc/csvd-platform-lab-mcm/eks-pipeline/terragrunt.hcl index db6488d..189e7f7 100644 --- a/lab/development/us-gov-east-1/vpc/csvd-platform-lab-mcm/eks-pipeline/terragrunt.hcl +++ b/lab/development/us-gov-east-1/vpc/csvd-platform-lab-mcm/eks-pipeline/terragrunt.hcl @@ -7,10 +7,12 @@ include "root" { locals { # Skip this module if disabled skip = !lookup(include.root.locals.is_module_enabled, basename(get_terragrunt_dir()), true) - artifact_bucket = format("v-s3-eks-%v-artifacts-%v-%v", - include.root.inputs.cluster_name, - include.root.inputs.aws_account_id, - join("", [for c in split("-", include.root.inputs.aws_region) : substr(c, 0, 1)])) + artifact_bucket = format("%v%v-%v-%v-%v", + local.prefixes["eks-s3"], + include.root.inputs.cluster_name, + "artifacts", + include.root.inputs.aws_account_id, + join("", [for c in split("-", include.root.inputs.aws_region) : substr(c, 0, 1)])) } exclude { @@ -35,7 +37,7 @@ inputs = { # VPC Configuration vpc_name = include.root.inputs.vpc_name - subnet_filter = "*-container-*" # or any specific pattern you want to use + subnet_filter = "*-container-*" # or any specific pattern you want to use is_infrastructure_pipeline = true @@ -59,9 +61,9 @@ inputs = { } security_scan_configuration = { - compute_type = "BUILD_GENERAL1_MEDIUM" - image = "aws/codebuild/amazonlinux2-x86_64-standard:3.0" - buildspec_path = "security.yml" + compute_type = "BUILD_GENERAL1_MEDIUM" + image = "aws/codebuild/amazonlinux2-x86_64-standard:3.0" + buildspec_path = "security.yml" } approval_configuration = {