I have this map:
mymap = "${
map(
"key1", "111111",
"key2", "222222",
"key3", "333333"
)
}"
I need it as a map for some things but for other things I just need a list of values like this:
mymap = [
"111111","222222","333333"
]
How can I convert the map to a list and store in another variable (in locals)?
Is the values
function something you're looking for?
Using 0.12
syntax for clarity:
locals {
myvalues = values(local.mymap)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With