Created
December 7, 2021 05:14
-
-
Save tomharrisonjr/ec878e1ad2cc31449837583c35941b10 to your computer and use it in GitHub Desktop.
Terraform count as a number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_instance" "server" { | |
count = 4 # create four similar EC2 instances | |
ami = "ami-a1b2c3d4" | |
instance_type = "t2.micro" | |
tags = { | |
Name = "Server ${count.index}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment