From 7e2a421d878a7429cb5354c704387a071a3cd4da Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 20 Oct 2014 13:34:14 -0700 Subject: [PATCH] providers/aws: ELB treats subnets as a set --- CHANGELOG.md | 1 + builtin/providers/aws/resource_aws_elb.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ffa7855..6710e2aae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ BUG FIXES: * providers/aws: Drain autoscale groups before deleting. [GH-435] * providers/aws: Fix crash case if launch config is manually deleted. [GH-421] * providers/aws: Disassociate EIP before destroying. + * providers/aws: ELB treats subnets as a set. ## 0.3.0 (October 14, 2014) diff --git a/builtin/providers/aws/resource_aws_elb.go b/builtin/providers/aws/resource_aws_elb.go index 9fffd321e..7782f7d45 100644 --- a/builtin/providers/aws/resource_aws_elb.go +++ b/builtin/providers/aws/resource_aws_elb.go @@ -59,11 +59,14 @@ func resourceAwsElb() *schema.Resource { // TODO: could be not ForceNew "subnets": &schema.Schema{ - Type: schema.TypeList, + Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ForceNew: true, Computed: true, + Set: func(v interface{}) int { + return hashcode.String(v.(string)) + }, }, // TODO: could be not ForceNew