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.1.tar.gz (7.3 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.1.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9187c36be1f8e648a041501ee9aa60deaec719e6aca1306ac0140d27f3546a83
MD5 1d10cc3a70e467615d14e3c83ae97a1d
BLAKE2b-256 07a68138d1d26b0c73b52ed5a94c6aebe28354012334194e110c1f68009ff6be

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_terragrunt_project-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b09b0047bae63532874631f77d3a3d5b11ae74c9449c452a0e1211f5e1051220
MD5 7214cd88057fce5ed66ee50cc80411f4
BLAKE2b-256 6e5a133ad39f8c1c1b2292016b0a81ed42592c42ec209b237033dbf03f2b94f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_terragrunt_project-0.1.1-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