Can only set access logs once per ELB.
This commit is contained in:
parent
e8f1f57ead
commit
91b1d0c23d
|
@ -448,7 +448,9 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
logs := d.Get("access_logs").(*schema.Set).List()
|
logs := d.Get("access_logs").(*schema.Set).List()
|
||||||
if len(logs) > 0 {
|
if len(logs) > 1 {
|
||||||
|
return fmt.Errorf("Only one access logs config per ELB is supported")
|
||||||
|
} else if len(logs) == 1 {
|
||||||
log := logs[0].(map[string]interface{})
|
log := logs[0].(map[string]interface{})
|
||||||
accessLogs := &elb.AccessLog{
|
accessLogs := &elb.AccessLog{
|
||||||
Enabled: aws.Bool(log["enabled"].(bool)),
|
Enabled: aws.Bool(log["enabled"].(bool)),
|
||||||
|
|
Loading…
Reference in New Issue