From 125977e075c7dbf6e8e5377f3d1abe18a4ba62f9 Mon Sep 17 00:00:00 2001 From: Hao-kang Den Date: Wed, 3 Sep 2014 09:38:07 +0800 Subject: [PATCH] allow vpc_zone_identifier in aws_autoscaling_group --- builtin/providers/aws/resource_aws_autoscaling_group.go | 5 +++-- website/source/docs/providers/aws/r/autoscale.html.markdown | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index dfef1250f..32e7baabd 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -65,9 +65,9 @@ func resource_aws_autoscaling_group_create( rs.Attributes, "load_balancers").([]interface{})) } - if _, ok := rs.Attributes["vpc_identifier.#"]; ok { + if _, ok := rs.Attributes["vpc_zone_identifier.#"]; ok { autoScalingGroupOpts.VPCZoneIdentifier = expandStringList(flatmap.Expand( - rs.Attributes, "vpc_identifier").([]interface{})) + rs.Attributes, "vpc_zone_identifier").([]interface{})) } autoScalingGroupOpts.Name = rs.Attributes["name"] @@ -296,6 +296,7 @@ func resource_aws_autoscaling_group_validation() *config.Validator { "desired_capacity", "force_delete", "load_balancers.*", + "vpc_zone_identifier.*", }, } } diff --git a/website/source/docs/providers/aws/r/autoscale.html.markdown b/website/source/docs/providers/aws/r/autoscale.html.markdown index a5b74ac05..ce05e48e9 100644 --- a/website/source/docs/providers/aws/r/autoscale.html.markdown +++ b/website/source/docs/providers/aws/r/autoscale.html.markdown @@ -40,6 +40,7 @@ The following arguments are supported: for all instances in the pool to terminate. * `load_balancers` (Optional) A list of load balancer names to add to the autoscaling group names. +* `vpc_zone_identifier` (Optional) A list of vpc IDs to launch resources in. ## Attributes Reference