Created
September 27, 2024 20:37
-
-
Save law/62b9c75214c18a015c37f16285a13ba4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa | |
terraform { | |
backend "s3" { | |
bucket = "mycorp-terraform" | |
dynamodb_table = "mycorp-tf-state-lock" | |
key = "production/us-west-2/k8s_cluster_config/terraform.tfstate" | |
region = "us-west-2" | |
} | |
} | |
# Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa | |
data "aws_caller_identity" "current" {} | |
data "aws_region" "current" {} | |
locals { | |
aws_account_mostpaths = "1234" | |
aws_account_root = "2345" | |
aws_account_security = "3456" | |
aws_account_monitoring = "4567" | |
account_id = data.aws_caller_identity.current.account_id | |
terraform_role_dev = "arn:aws:iam::2345:role/alltrails-terraform" | |
terraform_role_root = "arn:aws:iam::2345:role/alltrails-terraform" | |
terraform_role_cross_dev = "arn:aws:iam::2345:role/alltrails-terraform-cross" | |
terraform_role_cross_root = "arn:aws:iam::2345:role/alltrails-terraform-cross" | |
containing_repo_name = "terraform-infra" | |
root_module_directory = "production/us-west-2/k8s_cluster_config" | |
infra_ip_addresses = ["206.183.122.197/32", "107.142.110.21/32"] | |
merged_ips = concat(local.vpn_ip_addresses, local.infra_ip_addresses) | |
} | |
# Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa | |
locals { | |
environment = "production" | |
state_bucket = "mycorp-terraform" | |
state_region = "us-west-2" | |
} | |
# Generated by Terragrunt. Sig: | |
locals { | |
component = "k8s_cluster_config" | |
map_program_eligible_component = contains( | |
[ | |
"blazes_infra", # This module predates MAP, but only the recent OpenSearch resources are billable | |
"backup", | |
], | |
local.component | |
) | |
} | |
provider "aws" { | |
region = local.aws_region | |
default_tags { | |
tags = { | |
Environment = local.environment | |
Terraform = "True" | |
TerraformDir = "production/us-west-2/k8s_cluster_config" | |
TerraformRepo = local.containing_repo_name | |
VantaDescription = local.component | |
VantaNonProd = local.environment == "production" ? "false" : "true" | |
VantaOwner = "DevOps" | |
map-migrated = local.map_program_eligible_component || contains(["ap-southeast-2"], local.aws_region) ? "asdf" : null | |
} | |
} | |
} | |
provider "aws" { | |
alias = "us_west_2" | |
region = "us-west-2" | |
default_tags { | |
tags = { | |
Environment = local.environment | |
Terraform = "True" | |
TerraformRepo = local.containing_repo_name | |
TerraformDir = "production/us-west-2/k8s_cluster_config" | |
VantaOwner = "DevOps" | |
VantaNonProd = local.environment == "production" ? "false" : "true" | |
VantaDescription = local.component | |
map-migrated = local.map_program_eligible_component ? "asdf" : null | |
} | |
} | |
} | |
provider "aws" { | |
alias = "us_east_1" | |
region = "us-east-1" | |
default_tags { | |
tags = { | |
Environment = local.environment | |
Terraform = "True" | |
TerraformRepo = local.containing_repo_name | |
TerraformDir = "production/us-west-2/k8s_cluster_config" | |
VantaOwner = "DevOps" | |
VantaNonProd = local.environment == "production" ? "false" : "true" | |
VantaDescription = local.component | |
map-migrated = local.map_program_eligible_component ? "asdf" : null | |
} | |
} | |
} | |
provider "aws" { | |
alias = "eu_west_1" | |
region = "eu-west-1" | |
default_tags { | |
tags = { | |
Environment = local.environment | |
Terraform = "True" | |
TerraformRepo = local.containing_repo_name | |
TerraformDir = "production/us-west-2/k8s_cluster_config" | |
VantaOwner = "DevOps" | |
VantaNonProd = local.environment == "production" ? "false" : "true" | |
VantaDescription = local.component | |
map-migrated = local.map_program_eligible_component ? "asdf" : null | |
} | |
} | |
} | |
provider "aws" { | |
alias = "ap_southeast_2" | |
region = "ap-southeast-2" | |
default_tags { | |
tags = { | |
Environment = local.environment | |
Terraform = "True" | |
TerraformRepo = local.containing_repo_name | |
TerraformDir = "production/us-west-2/k8s_cluster_config" | |
VantaOwner = "DevOps" | |
VantaNonProd = local.environment == "production" ? "false" : "true" | |
VantaDescription = local.component | |
map-migrated = "asdf" | |
} | |
} | |
} | |
module "datadog_api_keys" { | |
providers = { | |
aws = aws.us_west_2 | |
} | |
source = "../../../modules/secrets" | |
name = "datadog-api-keys" | |
} | |
provider "datadog" { | |
api_key = module.datadog_api_keys.secrets["api-key"] | |
app_key = module.datadog_api_keys.secrets["app-key"] | |
api_url = "https://api.datadoghq.com/" | |
} | |
# Generated by Terragrunt. Sig: asdf | |
locals { | |
aws_region = "us-west-2" | |
} | |
# Generated by Terragrunt. Sig: asdf | |
terraform { | |
required_version = "~> 1.5" | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 5.61" | |
} | |
docker = { | |
source = "kreuzwerker/docker" | |
version = "3.0.2" | |
} | |
# Remember that non-hashicorp providers need to be re-specified in each module that uses the resources. | |
kubectl = { | |
source = "gavinbunney/kubectl" | |
version = "~> 1.14" | |
} | |
kubernetes = { | |
source = "hashicorp/kubernetes" | |
version = "~> 2.31" | |
} | |
datadog = { | |
source = "DataDog/datadog" | |
version = "~> 3.42" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment