Skip to main content

Configure, generate and apply Terraform modules to create and destroy Cloud Infrastructure

Project description

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

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

terragen-0.3.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

terragen-0.3.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file terragen-0.3.1.tar.gz.

File metadata

  • Download URL: terragen-0.3.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for terragen-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1e0ce960190667326030942136d88de9fb31d79ce92734c098226ee21ad46f56
MD5 d1fcce5a751bb448a673d4064f07e790
BLAKE2b-256 b21581e2bfaa9f200d5b60badb120b0c54e87311570684247a531257f5a7d57f

See more details on using hashes here.

File details

Details for the file terragen-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: terragen-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for terragen-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2b24e9ad0b8602de57185379eebd66cf138f4a95b4c191c64f34f1485953db7
MD5 173b5205e954ba34fe051091cb62b978
BLAKE2b-256 72487b27eb2b62c09d6eee0d069a5b8ca1d564093cd1dbd7c0a8ae677332524a

See more details on using hashes here.

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