I’m kind of new to terraform and I was wondering how we can build a map based on a variable. I wonder if this id doable.
Imagine the following scneario:
Later, I wanted to use it this way: data.template_file.files[“value1”].rendered
This is an easy example. Because, I would like to use the files in another scenario where the key will be passed as parameter depending on a variable.
Unfortunately, this doesn’t seems to work. So, I was wondering, how can I achieve this? Do I have to create a template_file for as much values that I have in my original list? Can’t this be dynamic?