Skip to content

Commit d27cc7a

Browse files
authored
Merge pull request #335 from bharathkkb/feature/fix-templating
Improve templating by removing *.tf in autogen and using *.tf.tmpl
2 parents 3945205 + 85c3e3f commit d27cc7a

File tree

11 files changed

+4
-2
lines changed

11 files changed

+4
-2
lines changed
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.

helpers/generate_modules/generate_modules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ def main(argv):
8282
lstrip_blocks=True,
8383
)
8484
templates = env.list_templates()
85-
for template_file in templates:
86-
for module in MODULES:
85+
for module in MODULES:
86+
for template_file in templates:
8787
template = env.get_template(template_file)
88+
if template_file.endswith(".tf.tmpl"):
89+
template_file = template_file.replace(".tf.tmpl", ".tf")
8890
rendered = template.render(
8991
module.template_options(BASE_TEMPLATE_OPTIONS)
9092
)

0 commit comments

Comments
 (0)