Flatten map(string) to List

I need to manipulate an output value to be a list.

Using a local how would I convert a map(string) to a list?

app_subnet_id = tomap({
“subnet1” = “subnet-xxxxxx”
“subnet3” = “subnet-yyyyyy”

I just need it as [“subnet-xxxxx”, “subnet-yyyyyy”]

Hi @jprouten,

I think you are describing what the values function does:


(Assuming that app_subnet_id is an input variable; use local.app_subnet_id instead if it’s a local value.)