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
Close
Hashes for terragrunt-generator-0.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc786b4f8152a296f7774f1832f2f7aefcca5f150fe98cf1219b21a95a73613b |
|
MD5 | 8337ea01b2daa91b54984c6680e1146f |
|
BLAKE2b-256 | cb701a739d0502c456cb4a74e432955778f1ba3f3ef2312db471c34ddfa97fdf |
Close
Hashes for terragrunt_generator-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a749016f01ec9b496e579dfee7bfe7db551d82c1a856dcd4ea27637c125bd65 |
|
MD5 | d8ed85b3f00216efe2faf98198a3b4cb |
|
BLAKE2b-256 | eb6477301e2802d6f0784863ba448526847aaf3b5869dc55477ddb46fb994135 |