Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support templating for Pass Files #341

Open
syepes opened this issue Jan 3, 2024 · 0 comments
Open

[FEATURE] Support templating for Pass Files #341

syepes opened this issue Jan 3, 2024 · 0 comments

Comments

@syepes
Copy link

syepes commented Jan 3, 2024

Summary

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

  1. Keep the current supported Pass Files extension functionality untouched (.tf, .tfvars and .rb)
  2. Add support for a new extension like .erb that adds this templating functionality
  3. Any files in config.build.pass_files that match this extension will be processed and all their expansions would be evaluated
  4. When moving the matched .erb files to the final build folder the extra extension fill be removed to keep the original filename. e.g.
config.yaml.erb --> files/config.yaml
config.json.erb --> files/config.json

Reference discussion:

https://community.boltops.com/t/terraform-tfvars-templating-is-not-filled-in/750/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant