Skip to content

Instantly share code, notes, and snippets.

@jveldboom
Last active November 30, 2018 23:46
Show Gist options
  • Save jveldboom/d5081f43c135ebdd27a43c2ddb9817ee to your computer and use it in GitHub Desktop.
Save jveldboom/d5081f43c135ebdd27a43c2ddb9817ee to your computer and use it in GitHub Desktop.
terraform-workspaces-vars
locals {
deployment_buckets = {
develop = "my-develop-bucket"
staging = "my-staging-bucket"
production = "my-production-bucket"
}
domains = {
develop = "develop.example.com"
staging = "staging.example.com"
production = "example.com"
}
domain = "${local.domains[terraform.workspace]}"
deployment_bucket = "${local.deployment_buckets[terraform.workspace]}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment