Can only set access logs once per ELB.
This commit is contained in:
parent
e8f1f57ead
commit
91b1d0c23d
|
@ -445,10 +445,12 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
|
|||
IdleTimeout: aws.Int64(int64(d.Get("idle_timeout").(int))),
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
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{})
|
||||
accessLogs := &elb.AccessLog{
|
||||
Enabled: aws.Bool(log["enabled"].(bool)),
|
||||
|
|
Loading…
Reference in New Issue