To reference the "name" value of the second instance of the fictitious resource "aws_instance" named "server", you can use the element index notation in Terraform. The element index notation allows you to access elements in a list or collection by their index.
Given that the index in Terraform starts from 0, the second instance has an index of 1. Therefore, to reference the "name" value of the second instance = B
The count.index starts from 0. Therefore, the second instance would have an index of 1. In that case, the correct answer would be B. aws_instance.web[1].name.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
franksoul
Highly Voted 2 years, 5 months agobigboi23
Highly Voted 2 years, 6 months agonmnm22
Most Recent 3 months, 2 weeks agonhaastrup
6 months, 3 weeks agokingfighers
7 months, 3 weeks agosamimshaikh
10 months, 4 weeks agogofavad926
1 year, 1 month agodebabrata6983
1 year, 2 months agoBere
1 year, 3 months agoBluemoon22
1 year, 7 months agoPower123
1 year, 7 months agothor7
1 year, 7 months agoNunyabiznes
1 year, 8 months agoEll89
1 year, 8 months agooab720
1 year, 10 months agoBebins
1 year, 11 months agoadouban
1 year, 11 months ago