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:
-
Scalability issues: As projects grow, maintaining a consistent folder structure across multiple environments and regions becomes challenging.
-
Duplication of code: Traditional approaches often lead to repetitive configurations, violating the DRY (Don't Repeat Yourself) principle.
-
Limited flexibility: Static configurations make it difficult to share complex variables or computed values across different levels of the hierarchy.
-
Complexity in reorganization: Restructuring existing Terragrunt projects can be cumbersome and error-prone.
Future objectives:
Future objectives for yaml2terragrunt may include:
- Enhancing support for multi-region and multi-environment setups.
- Implementing advanced features for dynamic configuration generation.
- Developing tools to facilitate easier migration from existing Terragrunt structures.
- 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f945900315deb7cba0c9b80741b08ee55c74fc75ed119190bb9f6f1b49b93704
|
|
| MD5 |
005c719a2f8f2a730cc7b3c3009a3e15
|
|
| BLAKE2b-256 |
83e6748a2dbf8f3b4f2b2f763454b70271c9f0404999c92d7e409a42ca3e536e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bdd2dd80623e41cf1cc64dea8579c3e11ffdb389f25a0534b1491c42197e520
|
|
| MD5 |
f7e12d8b6f23697d485e6280bbcee9e0
|
|
| BLAKE2b-256 |
a980d153171afcf98fd61ca70fd00f8a3146e636abc6d0ddf2e440a7ad3e9d60
|