gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
Mozilla Public License 2.0
157 stars 12 forks source link

Hackday/generator #133

Closed brikis98 closed 3 months ago

brikis98 commented 1 year ago

Description

Re-opening https://github.com/gruntwork-io/boilerplate/pull/122. Added some new tweaks. Please see this Slack thread for more context.

One time setup

In one terminal tab:

  1. cd boilerplate/html
  2. npm install
  3. npm start

Create a symlink from some repo with Gruntwork modules (e.g., our Service Catalog) to the examples/for-learning-and-testing/app/modules folder:

cd boilerplate
ln -s ~/src/terraform-aws-service-catalog/modules examples/for-learning-and-testing/app/modules

This gives us some real Terraform modules with which to test the "auto scaffolding" feature.

Run the gruntwork-as-an-app example (recommended)

This is the recommended example to use now, as it gives you a web UI that lets you click around to see all the other examples:

go run . --template-url examples/for-learning-and-testing/app --output-folder /tmp/app

Running other examples

  1. VPC example (YAML-driven):

    go run . --template-url examples/for-learning-and-testing/app/scaffolds/vpc-yml --output-folder /tmp/vpc
  2. Account setup example (Markdown-driven):

    go run . --template-url examples/for-learning-and-testing/app/scaffolds/aws-multi-account --output-folder /tmp/aws-multi-account
  3. Repo setup example (Markdown-driven):

    go run . --template-url examples/for-learning-and-testing/app/scaffolds/app-repo-structure --output-folder /tmp/app-repo-structure
  4. Any Terraform module (Terraform-driven):

    go run --template-url <ANY FOLDER WITH A SINGLE TF MODULE> --output-folder /tmp/tf-module
  5. Any Terraform module catalog (gives you catalog list view):

    go run --template-url <ANY FOLDER WITH MULTIPLE TF MODULE SUBFOLDERS> --output-folder /tmp/tf-catalog

TODOs

Read the Gruntwork contribution guidelines.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide