I have a list of objects from a variable in terraform
variable "persons" {
type = list(object({
name = string,
phonenumber = string,
tshirtSize = string
}))
description = "List of person"
}
Now I want a list of the person's names so I can use it to define an AWS Resource
How can I convert this object list to a list of names
["bob", "amy", "jane"]
I'm on terraform 0.12.24, though can upgrade if needed