Add support for ruby templating with the Terraspace context for specific file under the Pass Files folder
Motivation
Having this extra templating extension .erb would allow the generation of dynamic configuration files based on the terraspace deployment context.
This would allow to have more flexibility with the deployments and have one single solution.
Guide-level explanation
0) Keep the current supported Pass Files extension functionality untouched (.tf, .tfvars and .rb)
1) Add support for a new extension like .erb that adds this templating functionality
2) Any files in config.build.pass_files that match this extension will be processed and all their expansions would be evaluated
3) When moving the matched .erb files to the final build folder the extra extension fill be removed to keep the original filename. e.g.
Summary
Add support for ruby templating with the Terraspace context for specific file under the
Pass Files
folderMotivation
Having this extra templating extension
.erb
would allow the generation of dynamic configuration files based on the terraspace deployment context. This would allow to have more flexibility with the deployments and have one single solution.Guide-level explanation
0) Keep the current supported Pass Files extension functionality untouched (.tf, .tfvars and .rb) 1) Add support for a new extension like
.erb
that adds this templating functionality 2) Any files inconfig.build.pass_files
that match this extension will be processed and all their expansions would be evaluated 3) When moving the matched.erb
files to the final build folder the extra extension fill be removed to keep the original filename. e.g.Reference discussion:
https://community.boltops.com/t/terraform-tfvars-templating-is-not-filled-in/750/5