Here is the challenge:
I have an iterated for-each loop to create a bunch of elements in a list:
test_count = 90
test_items = [for i in range(local.test_count) : format("test%02s", i+1)]
What I need to do is to dynimcally create a local tuple that looks like the below:
custom_items = {
test01 = {
name = concat("test01", "shared value")
}
test02 = {
name = concat("test02", "shared value")
}
}
This is because the test01 component is used as a key later on for calling dynamically created modules.
However, I am not sure if or how one can dynamically create a list.
Obviously there will be a for_each loop or a for i in etc. in it, but I am not sure how to create the list, to be able to reference it later on.