Render a file template with variables.
Section: Expressions and Functions
templatefile function
hcl
hcl
user_data = templatefile("${path.module}/user-data.sh.tftpl", {
environment = var.environment
})Explanation
Render a file template with variables.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Expressions and Functions