Difference between revisions of "Terraform functions: templatefile"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
[[config.tftpl]] | [[config.tftpl]] | ||
− | %{ for config_key, config_value in config } | + | %{ [[for]] config_key, config_value in config } |
set ${config_key} = ${config_value} | set ${config_key} = ${config_value} | ||
− | %{ endfor ~} | + | %{ [[endfor]] ~} |
Revision as of 19:22, 28 May 2023
templatefile
https://www.terraform.io/docs/language/functions/templatefile.html
Official example
config.tftpl %{ for config_key, config_value in config } set ${config_key} = ${config_value} %{ endfor ~}
user_data = templatefile("${path.module}/assets/your_instance_data.tftpl", {})
Related
*.tftpl
- Terraform functions: file
map
- Terraform provider: template (Deprecated)
user_data
path.module
/etc/ecs/ecs.config
See also
Advertising: