HCL Map Reduce Support #784
mariux
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are proud to announce our newest addition to Variables:
The
map {}
block.The
map {}
block is available inglobals {}
andlets {}
.Detailed docs and examples of the current state are available here.
The Problem
Terraform and HCL in general conflict with error when generating maps using
{ for ... : key => value }
syntax that have duplicate keys.In some complex scenarios this is blocking addition of features and there is no easy solution to it. Even if you as a developer have an idea about the resolution of duplicate keys, you are not able to implement it in pure HCL.
Some possible resolution of conflicts are:
Solution
The
map {}
block feature in Globals and Lets variable definitions allows to define a set of resolutions by allowing access to the current state of the map in each iteration.This enables you to build a non conflicting complex and nested map from any input data.
Availability
We just released Terramate v0.2.7 over Christmas 2022.
This version has support for
map
inside ofglobals
andlets
blocks.Please read detailed docs and feel free to give constructive feedback, raise issues, or ask questions in our GitHub discussions.
How we use it
We are currently refactoring our commercial products like the "Google Cloud Framework" that combines a Google Cloud Landing Zone and Google Cloud Service Catalogs for Compute, Big Data, and Machine Learning and AI workloads in a fully automated and easy to configure way.
The
map {}
feature allows us to provide even easier configuration options with less constraints in usage to our customers.Beta Was this translation helpful? Give feedback.
All reactions