Skip to content

Instantly share code, notes, and snippets.

@vancluever
Created April 15, 2017 16:14
Show Gist options
  • Save vancluever/a521baeb4a5c77cbefe9b4e5aabe0e56 to your computer and use it in GitHub Desktop.
Save vancluever/a521baeb4a5c77cbefe9b4e5aabe0e56 to your computer and use it in GitHub Desktop.
Naming module (old form)
variable "env" {
type = "string"
}
variable "region" {
type = "string"
}
variable "endpoint_name" {
type = "string"
}
variable "domains" {
type = "map"
default = {
"production" = "foobar.local"
"staging" = "dev.foobar.local"
}
}
output "endpoint_name" {
value = "${var.endpoint_name}.${var.region}.${var.domains[var.env]}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment