Can only set access logs once per ELB.

This commit is contained in:
Trevor Pounds 2015-10-30 15:03:38 -07:00 committed by clint shryock
parent e8f1f57ead
commit 91b1d0c23d
1 changed files with 4 additions and 2 deletions

View File

@ -448,7 +448,9 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
}
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)),