Reputation: 31662
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)?
Upvotes: 5
Views: 6864
Reputation: 2258
Is the values
function something you're looking for?
Using 0.12
syntax for clarity:
locals {
myvalues = values(local.mymap)
}
Upvotes: 14