Question from the Terraform : certification training test

How to reference the name attribute of a specific instance of a resource in Terraform?

Hard

Consider the following block of code:

resource "google_storage_bucket" "this" {
  count    = 3
  name     = "test-bucket-${count.index}"
  location = "EU"
}

How do you reference the name attribute of the second instance of this resource?

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