Skip to main content

yaml2terragrunt is an open-source project designed to enable the dynamic creation of Terragrunt files, folders, and configurations using a declarative YAML approach. The primary objective is to simplify and streamline the management of complex infrastructure-as-code setups, particularly for organizations dealing with multiple environments, regions, and services.

Project description

Purpose:

yaml2terragrunt is an open-source project designed to enable the dynamic creation of Terragrunt files, folders, and configurations using a declarative YAML approach. The primary objective is to simplify and streamline the management of complex infrastructure-as-code setups, particularly for organizations dealing with multiple environments, regions, and services.

Aim:

The project aims to address several shortcomings of traditional Terragrunt folder structures:

  1. Scalability issues: As projects grow, maintaining a consistent folder structure across multiple environments and regions becomes challenging.

  2. Duplication of code: Traditional approaches often lead to repetitive configurations, violating the DRY (Don't Repeat Yourself) principle.

  3. Limited flexibility: Static configurations make it difficult to share complex variables or computed values across different levels of the hierarchy.

  4. Complexity in reorganization: Restructuring existing Terragrunt projects can be cumbersome and error-prone.

Future objectives:

Future objectives for yaml2terragrunt may include:

  1. Enhancing support for multi-region and multi-environment setups.
  2. Implementing advanced features for dynamic configuration generation.
  3. Developing tools to facilitate easier migration from existing Terragrunt structures.
  4. Improving integration with other infrastructure-as-code tools and workflows.

Summary:

By addressing these challenges, yaml2terragrunt aims to provide a more flexible, maintainable, and scalable approach to managing Terragrunt configurations for complex infrastructure projects.

Recommended Workflow

Create YAML configuration files with a standard structure Use the Python script to convert YAML to Terragrunt HCL Run Terragrunt/Terraform as normal with generated HCL files

Example YAML Configuration:

source: "github.com/module/path"
backend: "s3"
bucket: "my-terraform-state"
key: "environment/component"
region: "us-west-2"
inputs:
  instance_type: "t3.micro"
  environment: "staging"

Considerations and Limitations

Requires PyYAML and potentially tfmt for JSON to HCL conversion Complex configurations might need manual tweaking Performance overhead of conversion

Dependencies:

  • PyYAML
  • tfmt (optional, for JSON to HCL conversion)
  • Python 3.7+

Potential Enhancements:

  • Add robust error handling
  • Support for complex Terragrunt inheritance
  • Validation against Terraform schemas
  • Templating support

Contributing:

Contribution guidelines for this project

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

yaml2terragrunt-0.1.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

yaml2terragrunt-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file yaml2terragrunt-0.1.1.tar.gz.

File metadata

  • Download URL: yaml2terragrunt-0.1.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.8 Linux/6.8.0-49-generic

File hashes

Hashes for yaml2terragrunt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f945900315deb7cba0c9b80741b08ee55c74fc75ed119190bb9f6f1b49b93704
MD5 005c719a2f8f2a730cc7b3c3009a3e15
BLAKE2b-256 83e6748a2dbf8f3b4f2b2f763454b70271c9f0404999c92d7e409a42ca3e536e

See more details on using hashes here.

File details

Details for the file yaml2terragrunt-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yaml2terragrunt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.8 Linux/6.8.0-49-generic

File hashes

Hashes for yaml2terragrunt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bdd2dd80623e41cf1cc64dea8579c3e11ffdb389f25a0534b1491c42197e520
MD5 f7e12d8b6f23697d485e6280bbcee9e0
BLAKE2b-256 a980d153171afcf98fd61ca70fd00f8a3146e636abc6d0ddf2e440a7ad3e9d60

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