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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ef8b66c8132d2fb388cba16a352b5cfc318986deb964cf8343b38aa34bbf53 |
|
MD5 | 6cdb02e6cbd008293ebe5d70c123212d |
|
BLAKE2b-256 | ef87f1839fd562c7dfdc2821ffa36a04e7e0d723e91e88ad56604695f7403f61 |
Close
Hashes for terragrunt_generator-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05d3aa93967722f35e5e8d8603499663f1e7d16825344c802acf5471e359d396 |
|
MD5 | dc016e9984955368bdee207c7c3615d5 |
|
BLAKE2b-256 | 23d77c924946467f62e182727737b548848967bf1d8d9fa45b8b243f3ab5743a |