Difference between revisions of "Terraform functions: templatefile"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
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]] ~} |
Line 22: | Line 22: | ||
* <code>[[user_data]]</code> | * <code>[[user_data]]</code> | ||
* <code>[[path.module]]</code> | * <code>[[path.module]]</code> | ||
− | * [[/etc/ecs/ecs.config]] | + | * <code>[[/etc/ecs/ecs.config]]</code> |
+ | * <code>[[argocd_values.tftpl]]</code> | ||
== See also == | == See also == |
Latest revision as of 12:39, 8 July 2024
templatefile
https://www.terraform.io/docs/language/functions/templatefile.html
Official example[edit]
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[edit]
*.tftpl
- Terraform functions: file
map
- Terraform provider: template (Deprecated)
user_data
path.module
/etc/ecs/ecs.config
argocd_values.tftpl
See also[edit]
Advertising: