A lightweight Go CLI that renders Terraform-compatible templates by replacing ${NAME} placeholders with user-supplied values.
All official versions of tofu-template-tester are published on GitHub Releases. Since this application is written in Go, each release provides pre-compiled executables for macOS, Linux, and Windows—ready to download and run.
Alternatively, if you have Go installed, you can install tofu-template-tester directly from source using the following command:
go install github.com/UnitVectorY-Labs/tofu-template-tester@latest-list-params: List all template variables found in the input template.-in <path>: Path to the input template file. If not specified, input is read from STDIN.-properties <path>: Path to a properties file (key=value format) containing variable assignments.-interactive: Prompt for missing template variables interactively.-out <path>: Path to write the output. If not specified, output is written to STDOUT.
Suppose you have a template file named template.txt with the following content:
Hello, ${NAME}!
Your favorite color is ${COLOR}.
And a properties file named vars.properties with:
NAME=World
COLOR=Blue
You can render the template using the following command:
tofu-template-tester -in template.txt -properties vars.properties -out output.txtThis will produce the following output:
Hello, World!
Your favorite color is Blue.
Alternatively, you can use interactive mode:
tofu-template-tester -in template.txt -interactiveThe tool will then prompt you to enter values for NAME and COLOR.