Skip to main content

terragen

Terragen is a framework for generating and automatically applying Terraform modules to simplify the management of sophisticated Cloud Architectures

Key Features

  • Simplify the creation and destruction of infra across multiple accounts and regions, using one command
  • Fine grained CLI control, all config elements can be overridden on the CLI
  • View generated Terraform files before they are applied. Each run creates a timestamped output directory
  • Control common and app specific infra separately. Infra that is shared, eg VPCs, Databases can be controlled separately but still referenced by app specific infra
  • Create default config files you can "sub-class" for specific implementations, allows you to enforce config patterns across your estate
  • Boiler plate Terraform files, like config, tfvars automatically generated
  • Variable interpolation. You can lookup values from other config files.

Installing

Terragen can be installed via pip:

pip install terragen

ReadTheDocs

Full details on configuring and running Terragen on ReadTheDocs

Terragen Workspace

Terragen expects to be run in its own workspace containing its configuration and the Terraform modules you want to configure and apply.

Demo Commands

Once configured as defined in docs, Terragen is very powerful. Below we demonstrate some commands

Applying a Named Config

Terragen lets you define multiple apps and configs, just apply them by name

terragen --config-dir ./config --config-name sandbox

Specifying the environment we want to deploy to

Terragen lets you create the same infrastructure across multiple accounts by supplying the environment you want to deploy to

terragen --config-dir ./config build.environment=test

Debugging

Validate and resolve your config before you run it.

terragen -cd ./config --cfg job --resolve

Verbose debugging

You can enable verbose debug logging by passing the following:

terragen -cd ./config hydra.verbose=true

Metadata

Release files for terragen 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terragen 0.4.0
File Size Uploaded
terragen-0.4.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terragen 0.4.0
File Interpreter ABI Platform
terragen-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.3 kB

Release files / terragen-0.4.0.tar.gz

Download URL terragen-0.4.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f4f41dc19752345966cef39ec63e7532bc036fe6bc81ebe8f5c9574ec4a2cc8c
BLAKE2b-256 checksum
How to use checksums
dddf256e0df942047bf86d3db6befec9e70b190449ae50fa3d938eccbf63ee97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / terragen-0.4.0-py3-none-any.whl

Download URL terragen-0.4.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8701794e7fb5a7110caf1e404cb747d1f0ec05f0cf5ff257f3f3db92686cec22
BLAKE2b-256 checksum
How to use checksums
41fb78f7bb2b7958abe400b4060e55320c60c63deb6d9b396975f44ebe71c6d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page