diff --git a/CHANGELOG.md b/CHANGELOG.md index de0329007..2b21b26e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ BUG FIXES: computed so the value is still unknown. * providers/aws: Refresh of launch configs and autoscale groups load the correct data and don't incorrectly recreate themselves. [GH-425] + * providers/aws: Fix case where ELB would incorrectly plan to modify + listeners (with the same data) in some cases. ## 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 75374137e..373a1da77 100644 --- a/builtin/providers/aws/resource_aws_elb.go +++ b/builtin/providers/aws/resource_aws_elb.go @@ -216,6 +216,7 @@ func resourceAwsElbCreate(d *schema.ResourceData, meta interface{}) error { d.SetPartial("name") d.SetPartial("internal") d.SetPartial("availability_zones") + d.SetPartial("listener") d.SetPartial("security_groups") d.SetPartial("subnets") diff --git a/builtin/providers/aws/structure.go b/builtin/providers/aws/structure.go index ae8f707de..c349991cb 100644 --- a/builtin/providers/aws/structure.go +++ b/builtin/providers/aws/structure.go @@ -152,10 +152,10 @@ func flattenListeners(list []elb.Listener) []map[string]interface{} { for _, i := range list { result = append(result, map[string]interface{}{ "instance_port": i.InstancePort, - "instance_protocol": i.InstanceProtocol, + "instance_protocol": strings.ToLower(i.InstanceProtocol), "ssl_certificate_id": i.SSLCertificateId, "lb_port": i.LoadBalancerPort, - "lb_protocol": i.Protocol, + "lb_protocol": strings.ToLower(i.Protocol), }) } return result