providers/aws: elb properly hashes listeners

This commit is contained in:
Mitchell Hashimoto 2014-10-16 18:02:03 -07:00
parent 1a2afdaa37
commit 152d5b0c69
3 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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")

View File

@ -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