diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b51fc4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# Local .terraform directories +**/.terraform/* + +# terraform lock file. +**/.terraform.lock.hcl + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Exclude all .tfvars files, which are likely to contain sensitive data, +# such as password, private keys, and other secrets. These should not be +# part of version control as they are data points which are potentially +# sensitive and subject to change depending on the environment. +*.tfvars +*.tfvars.json + +# Ignore override files as they are usually used to override resources +# locally and so are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc + +# include tg stuff +.terragrunt-cache/ +backend.tf +provider*.tf diff --git a/lab/us-gov-east-1/vpc/cluster/eks-config/terragrunt.hcl b/lab/us-gov-east-1/vpc/cluster/eks-config/terragrunt.hcl index dc5e1a0..ae4a9c1 100644 --- a/lab/us-gov-east-1/vpc/cluster/eks-config/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/cluster/eks-config/terragrunt.hcl @@ -26,7 +26,7 @@ locals { } terraform { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git?ref=1.0.2" + 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/cluster/eks-loki/terragrunt.hcl b/lab/us-gov-east-1/vpc/cluster/eks-loki/terragrunt.hcl index bf1061a..62a03c5 100644 --- a/lab/us-gov-east-1/vpc/cluster/eks-loki/terragrunt.hcl +++ b/lab/us-gov-east-1/vpc/cluster/eks-loki/terragrunt.hcl @@ -1,5 +1,5 @@ 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?ref=lokiv3" extra_arguments "retry_lock" { commands = get_terraform_commands_that_need_locking() arguments = ["-lock-timeout=20m"] diff --git a/terragrunt.hcl b/lab/us-gov-east-1/vpc/cluster/terragrunt.hcl similarity index 100% rename from terragrunt.hcl rename to lab/us-gov-east-1/vpc/cluster/terragrunt.hcl 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 new file mode 100644 index 0000000..7e89b26 --- /dev/null +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-cert-manager/terragrunt.hcl @@ -0,0 +1,23 @@ +terraform { + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-cert-mgr.git" + extra_arguments "retry_lock" { + commands = get_terraform_commands_that_need_locking() + arguments = ["-lock-timeout=20m"] + } +} + +dependency "eks" { + config_path = "../eks" +} +dependency "eks-config" { + config_path = "../eks-config" +} +dependency "eks-istio" { + config_path = "../eks-istio" +} + +inputs = { + 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 new file mode 100644 index 0000000..b75605b --- /dev/null +++ b/lab/us-gov-east-1/vpc/mcmCluster/eks-config/terragrunt.hcl @@ -0,0 +1,66 @@ +locals { + 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" + } +} + +terraform { + source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git?ref=lokiv3" + extra_arguments "retry_lock" { + commands = get_terraform_commands_that_need_locking() + arguments = ["-lock-timeout=20m"] + } +} + +dependency "eks" { + config_path = "../eks" +} + +inputs = { + profile = dependency.eks.inputs.profile + vpc_id = dependency.eks.outputs.vpc_id + cluster_name = dependency.eks.inputs.cluster_name + cluster_autoscaler_role_name = dependency.eks.outputs.cluster_autoscaler_role_name + subnets = dependency.eks.outputs.subnets + security_group_all_worker_mgmt_id = dependency.eks.outputs.security_group_all_worker_mgmt_id + eks_managed_node_groups_autoscaling_group_names = dependency.eks.outputs.eks_managed_node_groups_autoscaling_group_names + oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn + tags = local.tags + tag_costallocation = local.tag_costallocation + region = local.region +} + +generate "provider-eks" { + path = "provider.tf" + if_exists = "overwrite_terragrunt" + contents = <