Fix schema conversion.
This commit is contained in:
parent
91b1d0c23d
commit
4e3d0b5f6c
|
@ -330,13 +330,13 @@ func resourceAwsElbRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
d.Set("source_security_group", lb.SourceSecurityGroup.GroupName)
|
d.Set("source_security_group", lb.SourceSecurityGroup.GroupName)
|
||||||
}
|
}
|
||||||
d.Set("subnets", lb.Subnets)
|
d.Set("subnets", lb.Subnets)
|
||||||
d.Set("idle_timeout", lbAttrs.ConnectionSettings.IdleTimeout)
|
d.Set("idle_timeout", lbAttrs.ConnectionSettings.IdleTimeout)
|
||||||
d.Set("connection_draining", lbAttrs.ConnectionDraining.Enabled)
|
d.Set("connection_draining", lbAttrs.ConnectionDraining.Enabled)
|
||||||
d.Set("connection_draining_timeout", lbAttrs.ConnectionDraining.Timeout)
|
d.Set("connection_draining_timeout", lbAttrs.ConnectionDraining.Timeout)
|
||||||
d.Set("access_logs", lbAttrs.AccessLog)
|
d.Set("access_logs", flattenAccessLog(lbAttrs.AccessLog))
|
||||||
|
|
||||||
resp, err := elbconn.DescribeTags(&elb.DescribeTagsInput{
|
resp, err := elbconn.DescribeTags(&elb.DescribeTagsInput{
|
||||||
LoadBalancerNames: []*string{lb.LoadBalancerName},
|
LoadBalancerNames: []*string{lb.LoadBalancerName},
|
||||||
})
|
})
|
||||||
|
|
||||||
var et []*elb.Tag
|
var et []*elb.Tag
|
||||||
|
|
|
@ -234,6 +234,22 @@ func expandElastiCacheParameters(configured []interface{}) ([]*elasticache.Param
|
||||||
return parameters, nil
|
return parameters, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flattens an access log into something that flatmap.Flatten() can handle
|
||||||
|
func flattenAccessLog(log *elb.AccessLog) []map[string]interface{} {
|
||||||
|
result := make([]map[string]interface{}, 0, 1)
|
||||||
|
|
||||||
|
if log != nil {
|
||||||
|
result = append(result, map[string]interface{}{
|
||||||
|
"enabled": *log.Enabled,
|
||||||
|
"interval": *log.EmitInterval,
|
||||||
|
"bucket": *log.S3BucketName,
|
||||||
|
"bucket_prefix": *log.S3BucketPrefix,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
// Flattens a health check into something that flatmap.Flatten()
|
// Flattens a health check into something that flatmap.Flatten()
|
||||||
// can handle
|
// can handle
|
||||||
func flattenHealthCheck(check *elb.HealthCheck) []map[string]interface{} {
|
func flattenHealthCheck(check *elb.HealthCheck) []map[string]interface{} {
|
||||||
|
|
Loading…
Reference in New Issue