how do i build a list of maps in terraform

Viewed 6980

i would like to build a list of maps in terraform. Is there an operation that would let me do that.

eg: i would like to build the structure (from aws_instance.test.*.private_ip)

addresses = [
   {
     address = private_ip-1
   },
   {
     address = private_ip-2
   }
   ...
]
2 Answers
Related