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.0.1.tar.gz (6.4 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.0.1.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d4555ff022e1c97d5b421747457ee39b332c5cb435ef926467d3c83dbba8eb51
MD5 7902489f68e4fbf5beb528b17d8f0503
BLAKE2b-256 f780b9377f2646821b25b91da9a6e144c637f69b7195b3b0e1ec515c896070b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cookiecutter_terragrunt_project-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1e208a9df9f0d761d04b24ac14e6c6d7162d850159afd1e53166fde152e4a14
MD5 0d8f48e720feca08b7868f1d6d7c2b15
BLAKE2b-256 a65bf7c24414b03ab93b50b04dae02f07c70cf5b4a209e577e200f9b97a9797f

See more details on using hashes here.

Provenance

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