Enable/Disable option for ALB Access Logs

This commit is contained in:
Joel Vasallo 2016-10-07 18:41:54 -05:00
parent d83770d582
commit a4743eac33
1 changed files with 6 additions and 1 deletions

View File

@ -88,6 +88,11 @@ func resourceAwsAlb() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"enabled": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Default: true,
},
},
},
},
@ -276,7 +281,7 @@ func resourceAwsAlbUpdate(d *schema.ResourceData, meta interface{}) error {
attributes = append(attributes,
&elbv2.LoadBalancerAttribute{
Key: aws.String("access_logs.s3.enabled"),
Value: aws.String("true"),
Value: aws.String(log["enabled"].(bool)),
},
&elbv2.LoadBalancerAttribute{
Key: aws.String("access_logs.s3.bucket"),