From d47e3f76eac30cc822458cdcb0b5482c7f4b8af0 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Tue, 29 Jul 2014 10:42:31 -0400 Subject: [PATCH] providers/aws: fix spelling of desired_capacity see #78 --- .../providers/aws/resource_aws_autoscaling_group.go | 10 +++++----- .../aws/resource_aws_autoscaling_group_test.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index 75f521345..4032a08d6 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -41,8 +41,8 @@ func resource_aws_autoscaling_group_create( autoScalingGroupOpts.SetDefaultCooldown = true } - if rs.Attributes["desired_capicity"] != "" { - autoScalingGroupOpts.DesiredCapacity, err = strconv.Atoi(rs.Attributes["desired_capicity"]) + if rs.Attributes["desired_capacity"] != "" { + autoScalingGroupOpts.DesiredCapacity, err = strconv.Atoi(rs.Attributes["desired_capacity"]) autoScalingGroupOpts.SetDesiredCapacity = true } @@ -196,7 +196,7 @@ func resource_aws_autoscaling_group_diff( Attrs: map[string]diff.AttrType{ "availability_zone": diff.AttrTypeCreate, "default_cooldown": diff.AttrTypeCreate, - "desired_capicity": diff.AttrTypeCreate, + "desired_capacity": diff.AttrTypeCreate, "force_delete": diff.AttrTypeCreate, "health_check_grace_period": diff.AttrTypeCreate, "health_check_type": diff.AttrTypeCreate, @@ -214,7 +214,7 @@ func resource_aws_autoscaling_group_diff( "health_check_type", "default_cooldown", "vpc_zone_identifier", - "desired_capicity", + "desired_capacity", "force_delete", }, } @@ -293,7 +293,7 @@ func resource_aws_autoscaling_group_validation() *config.Validator { Optional: []string{ "health_check_grace_period", "health_check_type", - "desired_capicity", + "desired_capacity", "force_delete", }, } diff --git a/builtin/providers/aws/resource_aws_autoscaling_group_test.go b/builtin/providers/aws/resource_aws_autoscaling_group_test.go index ae867ae4e..c81cc5fcf 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group_test.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group_test.go @@ -35,7 +35,7 @@ func TestAccAWSAutoScalingGroup(t *testing.T) { resource.TestCheckResourceAttr( "aws_autoscaling_group.bar", "health_check_type", "ELB"), resource.TestCheckResourceAttr( - "aws_autoscaling_group.bar", "desired_capicity", "4"), + "aws_autoscaling_group.bar", "desired_capacity", "4"), resource.TestCheckResourceAttr( "aws_autoscaling_group.bar", "force_delete", "true"), ), @@ -105,11 +105,11 @@ func testAccCheckAWSAutoScalingGroupAttributes(group *autoscaling.AutoScalingGro } if group.DesiredCapacity != 4 { - return fmt.Errorf("Bad desired_capicity: %s", group.DesiredCapacity) + return fmt.Errorf("Bad desired_capacity: %s", group.DesiredCapacity) } if group.LaunchConfigurationName != "" { - return fmt.Errorf("Bad desired_capicity: %s", group.DesiredCapacity) + return fmt.Errorf("Bad desired_capacity: %s", group.DesiredCapacity) } return nil