Итак, у меня есть набор из примерно 30 входов, которые используются всеми проектами. Мне интересно, как можно поделиться ими во всех файлах terragrunt.hcl без необходимости копировать их в миллионы разных мест. В настоящее время я использую файлы yaml для некоторых переопределений. Мне было интересно, каковы лучшие практики.
locals {
manager = "devops" # default contact
company_id = "moos3" # any string to identify the company for better resources naming. Keep max size of five chars.
default_yaml_path = find_in_parent_folders("empty.yaml") # terragrunt function. read the file content for better explanation.
enabled_api_services = [ # APIs enabled by default for all projects when created
"compute.googleapis.com",
"cloudkms.googleapis.com",
"cloudresourcemanager.googleapis.com",
"logging.googleapis.com",
"monitoring.googleapis.com",
"serviceusage.googleapis.com",
"storage-api.googleapis.com",
]
gcp_billing_account = "*****************" # gcp billing account where projects will be created
gcp_org_id = "*****************" # gcp organization id where resources will be created
gcp_seed_project_id = "my-seed" # initial seed project where terraform state bucket will be created
region = "us-east1" # default region for shared services
stack = "global" # architectural stack name
}
Было бы неплохо просто включить модуль для включения этих модулей или загрузить их по централизованному пути. Поскольку эти вещи не будут часто меняться.