Terraform

You have a list variable called "users" with an object containing a name attribute like this:

variable "users" {
  type = list(object({
    name = string
    age  = number
  }))
}

How to access the name attribute of the second item in that list?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

users[1].name