Question from the Terraform : certification training test

What does this Terraform code do?

Easy

Consider the following block of code:

resource "aws_instance" "web" {
  count = var.high_availability ? 3 : 1
  
  tags = {
    Name = count.index == 0 ? "web-primary" : "web-secondary-${count.index}"
  }
}

Which statement(s) about this code are true? (choose 2 answers)

Author: Julien WITTOUCKStatus: PublishedQuestion passed 9 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!