diff --git a/builtin/providers/aws/resource_aws_autoscaling_group_test.go b/builtin/providers/aws/resource_aws_autoscaling_group_test.go index d26f47275..8d26320c0 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group_test.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group_test.go @@ -89,7 +89,6 @@ func TestAccAWSAutoScalingGroup_autoGeneratedName(t *testing.T) { }, }, }) - } func TestAccAWSAutoScalingGroup_tags(t *testing.T) { @@ -153,13 +152,11 @@ func TestAccAWSAutoScalingGroup_VpcUpdates(t *testing.T) { testAccCheckAWSAutoScalingGroupExists("aws_autoscaling_group.bar", &group), testAccCheckAWSAutoScalingGroupAttributesVPCZoneIdentifer(&group), resource.TestCheckResourceAttr( - "aws_autoscaling_group.bar", "availability_zones.#", "2"), + "aws_autoscaling_group.bar", "availability_zones.#", "1"), resource.TestCheckResourceAttr( "aws_autoscaling_group.bar", "availability_zones.2487133097", "us-west-2a"), resource.TestCheckResourceAttr( - "aws_autoscaling_group.bar", "availability_zones.221770259", "us-west-2b"), - resource.TestCheckResourceAttr( - "aws_autoscaling_group.bar", "vpc_zone_identifier.#", "2"), + "aws_autoscaling_group.bar", "vpc_zone_identifier.#", "1"), ), }, }, @@ -411,21 +408,10 @@ resource "aws_launch_configuration" "foobar" { resource "aws_autoscaling_group" "bar" { availability_zones = ["us-west-2a"] - max_size = 1 - min_size = 1 - health_check_grace_period = 300 - health_check_type = "ELB" - desired_capacity = 1 - force_delete = true - termination_policies = ["OldestInstance","ClosestToNextInstanceHour"] - + desired_capacity = 0 + max_size = 0 + min_size = 0 launch_configuration = "${aws_launch_configuration.foobar.name}" - - tag { - key = "Foo" - value = "foo-bar" - propagate_at_launch = true - } } ` @@ -589,29 +575,18 @@ resource "aws_subnet" "main" { } } -resource "aws_subnet" "alt" { - vpc_id = "${aws_vpc.default.id}" - cidr_block = "10.0.2.0/24" - availability_zone = "us-west-2b" - tags { - Name = "asg-vpc-thing" - } -} - resource "aws_launch_configuration" "foobar" { image_id = "ami-b5b3fc85" instance_type = "t2.micro" } resource "aws_autoscaling_group" "bar" { - availability_zones = ["us-west-2a"] - max_size = 2 - min_size = 1 - health_check_grace_period = 300 - health_check_type = "ELB" - desired_capacity = 1 - force_delete = true - termination_policies = ["OldestInstance"] + availability_zones = [ + "us-west-2a" + ] + desired_capacity = 0 + max_size = 0 + min_size = 0 launch_configuration = "${aws_launch_configuration.foobar.name}" } ` @@ -633,15 +608,6 @@ resource "aws_subnet" "main" { } } -resource "aws_subnet" "alt" { - vpc_id = "${aws_vpc.default.id}" - cidr_block = "10.0.2.0/24" - availability_zone = "us-west-2b" - tags { - Name = "asg-vpc-thing" - } -} - resource "aws_launch_configuration" "foobar" { image_id = "ami-b5b3fc85" instance_type = "t2.micro" @@ -650,15 +616,10 @@ resource "aws_launch_configuration" "foobar" { resource "aws_autoscaling_group" "bar" { vpc_zone_identifier = [ "${aws_subnet.main.id}", - "${aws_subnet.alt.id}", ] - max_size = 2 - min_size = 1 - health_check_grace_period = 300 - health_check_type = "ELB" - desired_capacity = 1 - force_delete = true - termination_policies = ["OldestInstance"] + desired_capacity = 0 + max_size = 0 + min_size = 0 launch_configuration = "${aws_launch_configuration.foobar.name}" } ` @@ -666,7 +627,7 @@ resource "aws_autoscaling_group" "bar" { const testAccAWSAutoScalingGroupConfig_withPlacementGroup = ` resource "aws_launch_configuration" "foobar" { image_id = "ami-21f78e11" - instance_type = "c3.large" + instance_type = "t2.micro" } resource "aws_placement_group" "test" {