Skip to content

Commit

Permalink
Merge pull request terraform-google-modules#335 from bharathkkb/featu…
Browse files Browse the repository at this point in the history
…re/fix-templating

Improve templating by removing *.tf in autogen and using *.tf.tmpl
  • Loading branch information
morgante authored Nov 20, 2019
2 parents 9e5adf9 + d94749d commit 312a559
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions helpers/generate_modules/generate_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ def main(argv):
lstrip_blocks=True,
)
templates = env.list_templates()
for template_file in templates:
for module in MODULES:
for module in MODULES:
for template_file in templates:
template = env.get_template(template_file)
if template_file.endswith(".tf.tmpl"):
template_file = template_file.replace(".tf.tmpl", ".tf")
rendered = template.render(
module.template_options(BASE_TEMPLATE_OPTIONS)
)
Expand Down

0 comments on commit 312a559

Please sign in to comment.