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.1.tar.gz
.
File metadata
- Download URL: terragrunt-generator-0.6.1.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 | 66ef8b66c8132d2fb388cba16a352b5cfc318986deb964cf8343b38aa34bbf53 |
|
MD5 | 6cdb02e6cbd008293ebe5d70c123212d |
|
BLAKE2b-256 | ef87f1839fd562c7dfdc2821ffa36a04e7e0d723e91e88ad56604695f7403f61 |
File details
Details for the file terragrunt_generator-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: terragrunt_generator-0.6.1-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 | 05d3aa93967722f35e5e8d8603499663f1e7d16825344c802acf5471e359d396 |
|
MD5 | dc016e9984955368bdee207c7c3615d5 |
|
BLAKE2b-256 | 23d77c924946467f62e182727737b548848967bf1d8d9fa45b8b243f3ab5743a |