Skip to content

Instantly share code, notes, and snippets.

@tafaust
Created January 31, 2026 14:36
Show Gist options
  • Select an option

  • Save tafaust/6cc8cb0b0554140bd2bd9caaa20caeeb to your computer and use it in GitHub Desktop.

Select an option

Save tafaust/6cc8cb0b0554140bd2bd9caaa20caeeb to your computer and use it in GitHub Desktop.
locals {
constrained_config = {
"payments-service-networking-dev" = { /* dev settings */ }
"payments-service-networking-staging" = { /* staging settings */ }
"payments-service-networking-prod" = { /* prod settings */ }
}
# tflint-ignore: terraform_unused_declarations
workspace_config = local.constrained_config[terraform.workspace] # Crash if we try to use a disallowed workspace
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment