What Name tags do the three instances get?
resource "aws_instance" "web" {
count = 3
tags = { Name = "web-${count.index}" }
}
- web-1, web-2, web-3
- web-0, web-1, web-2
- web-3, web-3, web-3
- web-0, web-0, web-0
count.index is the zero-based position of each copy, so three copies are numbered 0, 1 and 2.
Play DevOps ▸