Skip to main content

A Cookiecutter template to scaffold scalable, multi-environment Terragrunt infrastructure projects.

Project description

cookiecutter-terragrunt-project

CI License: MIT Python uv

A Cookiecutter template to scaffold scalable, multi-environment Terragrunt infrastructure projects: a DRY root configuration (providers, GCS remote state, version pin), a per-environment config.<env>.yaml, and a set of shell helpers wrapping the Terragrunt CLI.

Features

  • Multi-environment — switch between dev / staging / prod with a per-environment YAML config.
  • DRY — one root terragrunt.hcl every module inherits via find_in_parent_folders().
  • Batteries included.bashrc helpers (switch_env, plan, apply, destroy, …) wrapping the modern Terragrunt CLI.
  • Pairs with terragrunt-generator to populate the scaffold with per-module terragrunt.hcl files.

Requirements

Usage

Generate a project straight from GitHub (no install needed):

uvx cookiecutter gh:goabonga/cookiecutter-terragrunt-project
# or: cookiecutter gh:goabonga/cookiecutter-terragrunt-project

Or install the published template from PyPI and bake the bundled copy:

pip install cookiecutter-terragrunt-project
cookiecutter "$(python -c 'import cookiecutter_terragrunt_project as p; print(p.__path__[0])')"

Answer the prompts (project_name, default_environment, remote_state_bucket_name, …) and you get:

<project_slug>/
├── .bashrc                 # terragrunt helpers (switch_env, plan, apply, …)
├── config.<env>.yaml       # per-environment values
└── google/
    └── terragrunt.hcl      # root config: providers, GCS backend, versions

Day-2 workflow

source .bashrc           # adds switch_env / plan / apply / destroy / …
switch_env dev           # sets ENV=dev and the gcloud project
plan  ./google/network   # terragrunt run --all -- plan on a subtree
apply ./google/network/vpc

Development

git clone https://github.com/goabonga/cookiecutter-terragrunt-project.git
cd cookiecutter-terragrunt-project
uv sync
uv run pytest          # bake smoke tests
uvx cookiecutter .     # generate a project from the working copy

See CONTRIBUTING.md for the workflow, the commit-message convention and the release process. By participating you agree to the Code of Conduct. Security issues: see SECURITY.md.

License

Distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter_terragrunt_project-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cookiecutter_terragrunt_project-0.1.0.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53a6e09ffb210a66ef84ebf9d682669efda1b50803e9c02f0b71550019ffcdd2
MD5 c740aecd32cb6599bf49aec5222ef8f2
BLAKE2b-256 522a84fff9b00aedc1c30012a628afe561368e6c39265ef1cecf2c2da3053efa

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_terragrunt_project-0.1.0.tar.gz:

Publisher: ci.yml on goabonga/cookiecutter-terragrunt-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cookiecutter_terragrunt_project-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e820f2fe109786d982f61735cf8a20cf5a6b347793b357e4d9db993c495c0702
MD5 692612f7bbf0bdf39e79d9076a7439d2
BLAKE2b-256 fb0716107d585780015b33e4402c64a04333a484229b95131b24fe9db7664887

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_terragrunt_project-0.1.0-py3-none-any.whl:

Publisher: ci.yml on goabonga/cookiecutter-terragrunt-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page