Skip to content

Instantly share code, notes, and snippets.

@brunodasilvalenga
Created May 5, 2020 14:13
Show Gist options
  • Save brunodasilvalenga/163639be93e209b159733aa244304f66 to your computer and use it in GitHub Desktop.
Save brunodasilvalenga/163639be93e209b159733aa244304f66 to your computer and use it in GitHub Desktop.
variable "aws_account_id" {}
variable "aws_role" {}
variable "org_name" {
default = "example"
}
locals {
env = {
nonprod-ap-southeast-2-dev = {
environment_name = "dev"
account_name = "nonprod"
ecs_platform_workspace = "nonprod-ap-southeast-2-dev"
certificate_domain = "*.dev.cloud.example.com.au"
hosted_zone = "dev.cloud.example.com.au"
#app
app_app_name = "app"
app_hostname = "app.dev.cloud.example.com.au"
app_hosted_zone = "dev.cloud.example.com.au"
#api-gateway
api_gateway_hostname = "api.dev.cloud.example.com.au"
api_gateway_hosted_zone = "dev.cloud.example.com.au"
api_gateway_create_domain = true
alarm_sns_topics = []
}
# dev:example-bruno-valenga (123041)
# DEV01
nonprod-ap-southeast-2-dev-123041 = {
environment_name = "dev"
account_name = "nonprod"
ecs_platform_workspace = "nonprod-ap-southeast-2-dev"
certificate_domain = "*.dev.cloud.example.com.au"
hosted_zone = "dev.cloud.example.com.au"
#app
app_app_name = "app-123041"
app_hostname = "app-123041.dev.cloud.example.com.au"
app_hosted_zone = "dev.cloud.example.com.au"
#api-gateway
api_gateway_hostname = "api-123041.dev.cloud.example.com.au"
api_gateway_hosted_zone = "dev.cloud.example.com.au"
api_gateway_create_domain = true
alarm_sns_topics = []
}
# dev:example-homer-simpson (1235123)
# DEV02
nonprod-ap-southeast-2-dev-1235123 = {
environment_name = "dev"
account_name = "nonprod"
ecs_platform_workspace = "nonprod-ap-southeast-2-dev"
certificate_domain = "*.dev.cloud.example.com.au"
hosted_zone = "dev.cloud.example.com.au"
#app
app_app_name = "app-1235123"
app_hostname = "app-1235123.dev.cloud.example.com.au"
app_hosted_zone = "dev.cloud.example.com.au"
#api-gateway
api_gateway_hostname = "api-1235123.dev.cloud.example.com.au"
api_gateway_hosted_zone = "dev.cloud.example.com.au"
api_gateway_create_domain = true
alarm_sns_topics = []
}
prod-ap-southeast-2-default = {
environment_name = "prod"
account_name = "prod"
ecs_platform_workspace = "prod-ap-southeast-2-default"
certificate_domain = "*.example.com.au"
hosted_zone = "prod.cloud.example.com.au"
#app
app_app_name = "app"
app_hostname = "app.prod.cloud.example.com.au"
app_hosted_zone = "prod.cloud.example.com.au"
#api-gateway
api_gateway_hostname = "api.example.com.au"
api_gateway_hosted_zone = "prod.cloud.example.com.au"
api_gateway_create_domain = false
alarm_sns_topics = []
}
}
workspace = "${local.env[terraform.workspace]}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment