Last active
March 30, 2020 22:20
-
-
Save ImIOImI/1aa9e758d671ee7aa7a99988b5d72c03 to your computer and use it in GitHub Desktop.
Simple Terraform 12 Map Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####Simple Map example#### | |
output "out" { | |
value = var.project-map[var.environment] | |
} | |
variable "environment" { | |
default = "stage" | |
} | |
variable "project-map" { | |
type = map(string) | |
description = "Simple example of how to make a string map variable in Terraform 12" | |
default = { | |
dev = "dev.example.com" | |
stage = "stage.example.com" | |
prod = "prod.example.com" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment