deepmerge

Invicton-Labs/deepmerge/null

Terraform Module HCL NULL

This module performs a deep map merge of standard Terraform maps/objects

Install

module "deepmerge" {
source = "Invicton-Labs/deepmerge/null"
version = "0.1.6"
}
⭐ Source on GitHub 📦 Registry page

README

Deepmerge This module performs a deep map merge of standard Terraform maps/objects. It is functionally similar to the built-in merge function, except that it will merge maps at the same depth instead of overwriting them. It can handle maps with a depth up to 100 (see commented-out code at the bottom of main.tf if you want to modify it to handle deeper maps). It functions by "flattening" each input map into a map of depth 1 where each key is the full path to the value in question. It then uses the standard merge function on these flat maps, and finally it re-builds the map structure in reverse order. Note: Lists will be overwritten. Only maps are merged. Usage `` locals { map1 = { key1-1 = { key1-1-1 = "value1-1-1" key1-1-2 = "value1-1-2" key1-1-3 = { key1-1-3-1 = "value1-1-3-1" key1-1-3-2

Inputs (1)

NameTypeDescriptionDefault
mapsanyA list of maps to merge. Maps should be ordered in increasing precedence, i.e. v required

Outputs (1)

merged — The merged map.

Details

FrameworkTerraform Module
LanguageHCL
Version0.1.6
Cloud NULL
Total downloads7.2M
Inputs1
Outputs1
Examples1
NamespaceInvicton-Labs
Updated