No project description provided
Project description
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") })
)
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.6.0.tar.gz
.
File metadata
- Download URL: terragrunt-generator-0.6.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc786b4f8152a296f7774f1832f2f7aefcca5f150fe98cf1219b21a95a73613b |
|
MD5 | 8337ea01b2daa91b54984c6680e1146f |
|
BLAKE2b-256 | cb701a739d0502c456cb4a74e432955778f1ba3f3ef2312db471c34ddfa97fdf |
File details
Details for the file terragrunt_generator-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: terragrunt_generator-0.6.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a749016f01ec9b496e579dfee7bfe7db551d82c1a856dcd4ea27637c125bd65 |
|
MD5 | d8ed85b3f00216efe2faf98198a3b4cb |
|
BLAKE2b-256 | eb6477301e2802d6f0784863ba448526847aaf3b5869dc55477ddb46fb994135 |