Используйте tag_specifications
с resource_type
из volume
.
resource "aws_launch_template" "foo" {
name = "foo"
block_device_mappings {
device_name = "/dev/sda1"
ebs {
volume_size = 20
}
}
image_id = "ami-test"
instance_type = "t2.micro"
key_name = "test"
tag_specifications {
resource_type = "instance"
tags = {
Name = "test"
}
}
tag_specifications {
resource_type = "volume"
tags = {
Name = "test"
}
}
}