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

Jinja2 instead of template_file. #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosesrenegade
Copy link

While working on a different project, I came across a great idea for building Terraform Templates. This came from the Amazon Account Factory Terraform modules, which use jinja-cli to convert Jinja templates into Terraform files. I decided to refactor your phishing_app template. Please note the following:

  • templates/phishing_app. Jinja would be where the Jinja based terraform module will live within the generator
  • phishing_app.py is much smaller, with less code required to make it work. You will need to have a requirements.txt that installed Jinja2 itself.

for building Terraform Templates. This was really coming from the
Amazon Account Factory Terraform modules in which they use
jinja-cli to convert Jinja templates into Terraform files. I decided
to refactor your phishing_app template. Please note the following:

- templates/phishing_app.jinja would be where the Jinja based terraform
module will live within the generator
- phishing_app.py is now much smaller in size with less code required
to make it work. You will need to have a requirements.txt that installed
Jinja2 itself.
@dorp007
Copy link

dorp007 commented Mar 1, 2023

Hello,

Please make the necessary changes to the file "requirements.txt" and submit that also as a pull request before contributing to this branch of [PurpleCloud]. For code review. Please note that this is the master branch and must be revised by other open-source software users before merging.

@iknowjason
Copy link
Owner

Hello,

Please make the necessary changes to the file "requirements.txt" and submit that also as a pull request before contributing to this branch of [PurpleCloud]. For code review. Please note that this is the master branch and must be revised by other open-source software users before merging.

This is a great idea for enhancement. But we need to make this change across all 8 of the generators, coordinate the changes, and update the documentation. Waiting to see if someone can make the changes or I'll prioritize this myself at some point in the future.

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

Successfully merging this pull request may close these issues.

None yet

4 participants