generate terragrunt manifest from terraform module.
Project description
🚀 terragrunt-generator 🎉
🪄 What is terragrunt-generator?
terragrunt-generator is your one-stop tool to automatically generate terragrunt.hcl
files with well-documented inputs from variables exposed by Terraform modules. The magic happens with a simple YAML configuration file, making your setup process as smooth as butter! 🧈✨
📋 Requirements
- Python 3.6+
🔧 Installation
pip install terragrunt-generator
🎯 Usage
🔍 Command Overview
terragrunt-generator --help
You'll see something like this:
usage: terragrunt-generator [-h] [-V] -u URL [-v VERSION] [-p PATH]
[--include | --no-include] -l LOOKUP
Generate terragrunt.hcl configuration from a Terraform module.
Options:
-h, --help Show this help message and exit
-V Show program's version number and exit
-u URL, --url URL The module repository URL
-v VERSION, --version VERSION
The module version to use
-p PATH, --path PATH Define the module path if needed
--include, --no-include
Include or exclude the rendering of the include block (default: True)
-l LOOKUP, --lookup LOOKUP
Define the lookup path
📚 Example Usage
terragrunt-generator \
-u https://github.com/terraform-google-modules/terraform-google-project-factory.git \
-v v14.2.1 \
-l 'project'
📝 Sample Output
# terraform-google-modules v14.2.1
# https://github.com/terraform-google-modules/terraform-google-project-factory/tree/v14.2.1/
include {
path = find_in_parent_folders()
}
locals {
source = "github.com/terraform-google-modules/terraform-google-project-factory.git?ref=v14.2.1"
all = merge(
yamldecode(file(find_in_parent_folders("config.yaml"))),
)
}
terraform {
source = lookup(local.all, "project", false) == false ? null : lookup(local.all.project, "enabled", false) == false ? null : local.source
}
inputs = merge({
billing_account = lookup(local.all.project, "billing_account", "")
name = lookup(local.all.project, "name", "")
org_id = lookup(local.all.project, "org_id", "")
activate_api_identities = lookup(local.all.project, "activate_api_identities", [])
activate_apis = lookup(local.all.project, "activate_apis", ["compute.googleapis.com"])
})
🙌 Contribute
Got a cool idea? Found a bug? Contributions are welcome! Check out our contributing guidelines and help make terragrunt-generator
even better! 🚀
Enjoy automating your Terragrunt configurations with ease! 🎉
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
File details
Details for the file terragrunt_generator-0.9.0.tar.gz
.
File metadata
- Download URL: terragrunt_generator-0.9.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65eb73326dd91419a30e9e470d94c67a23340201bb5b809cbaa5f196b5c50956 |
|
MD5 | a51bda092aacecdefb32a9164d71e175 |
|
BLAKE2b-256 | edbb99f727be7cff338d5d08d80bee606ec238dbaff3bc03e20411aef14ea23d |
File details
Details for the file terragrunt_generator-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: terragrunt_generator-0.9.0-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 363aa31ffae17205314738c6778123be3843cc7d9e5297dc0109efb839a2c0df |
|
MD5 | f785abf528aded6f844b5767c505a683 |
|
BLAKE2b-256 | 6e70be9e0108f8ffd1f116380d292a71dade98ed33c1fd4bc74fb12c2285f625 |