When using Terraform AWS provider aws_launch_template
resource I want all EC2 Instances to be launched in the single Availability zone.
resource "aws_instance" "name" {
count = 11
launch_template {
name = aws_launch_template.template_name.name
}
}
And in the resource aws_launch_template{}
in the placement{}
block I have defined certain Availability zone:
resource "aws_launch_template" "name" {
placement {
availability_zone = "eu-west-3a"
}
}
But this did not work and all Instances were created in the eu-west-3c
Availability Zone.
Does anyone know why that did not work ? And what is the purpose of argument availability_zone
in the placement{}
block ?