Created
March 25, 2022 13:34
-
-
Save Satak/8d354897aa3a62321ac23dcddd1dc7ae to your computer and use it in GitHub Desktop.
Terraform templatefile
This file contains hidden or 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
config: | |
name: "this is ${env} config" |
This file contains hidden or 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
variable "env" { | |
default = "dev" | |
} | |
output "data" { | |
value = tomap(yamldecode(templatefile("${path.module}/config.yaml", { env : var.env })))["config"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment