terragrunt-generator
terragrunt-generator provide a way to generate a terragrunt.hcl file with documented inputs who's coming from variables exposed by terraform module.
The result is easily configurable with a yaml file.
Requirements
- python3.6+
Instalation
$ pip install terragrunt-generator
Usages
Exec
terragrunt-generator -u https://github.com/goabonga/terragrunt-generator.git -v main -p /examples/modules
Results
# modules main
#
# yaml config
# ```
# modules:
# enabled: true
# required:
# optional: "optional"
# # nullable:
# ```
#
include {
path = "${find_in_parent_folders()}"
}
locals {
all = merge(
yamldecode(file("find_in_parent_folders("config.yaml")")),
)
}
terraform {
source = lookup(local.all["modules"], "enabled", true) == true ? "https://github.com/goabonga/terragrunt-generator.git////examples/modules?ref=main" : null
}
inputs = merge({
# required - required value - required
required = lookup(local.all["modules"], "required", "None")
# optional - optional value
optional = lookup(local.all["modules"], "optional", "optional")
},
# nullable - nullable value
(lookup(local.all["modules"], "nullable", null) == null ? {} : { nullable = lookup(local.all["modules"], "nullable") })
)
Release files for terragrunt-generator 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| terragrunt-generator-0.6.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| terragrunt_generator-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / terragrunt-generator-0.6.0.tar.gz
| Download URL | terragrunt-generator-0.6.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc786b4f8152a296f7774f1832f2f7aefcca5f150fe98cf1219b21a95a73613b
|
|
BLAKE2b-256 checksum How to use checksums |
cb701a739d0502c456cb4a74e432955778f1ba3f3ef2312db471c34ddfa97fdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / terragrunt_generator-0.6.0-py3-none-any.whl
| Download URL | terragrunt_generator-0.6.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a749016f01ec9b496e579dfee7bfe7db551d82c1a856dcd4ea27637c125bd65
|
|
BLAKE2b-256 checksum How to use checksums |
eb6477301e2802d6f0784863ba448526847aaf3b5869dc55477ddb46fb994135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|