Terraform Associate 003

Terraform Associate 003 practice questions, page 6 of 6, with answer review and explanations.

Question 26

A resource block is shown in the Exhibit space of this page. How would you reference the name value of the second instance of this resource?

  1. aws_instance.web[1]
  2. element(aws_instance.web, 2)
  3. aws_instance.web[2].name
  4. aws_instance.web[1].name
  5. aws_instance.web.*.name