ALB: Enabled s3.enabled and changed default value of s3.enabled

- Disabled access logs by default
- Enabled case to set value of s3.enabled
This commit is contained in:
Joel Vasallo 2016-10-10 09:46:28 -05:00
parent 16c1366e63
commit f290a3a955
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,7 @@ func resourceAwsAlb() *schema.Resource {
"enabled": &schema.Schema{ "enabled": &schema.Schema{
Type: schema.TypeBool, Type: schema.TypeBool,
Optional: true, Optional: true,
Default: true, Default: false,
}, },
}, },
}, },
@ -234,6 +234,8 @@ func resourceAwsAlbRead(d *schema.ResourceData, meta interface{}) error {
accessLogMap := map[string]interface{}{} accessLogMap := map[string]interface{}{}
for _, attr := range attributesResp.Attributes { for _, attr := range attributesResp.Attributes {
switch *attr.Key { switch *attr.Key {
case "access_logs.s3.enabled":
accessLogMap["enabled"] = *attr.Value
case "access_logs.s3.bucket": case "access_logs.s3.bucket":
accessLogMap["bucket"] = *attr.Value accessLogMap["bucket"] = *attr.Value
case "access_logs.s3.prefix": case "access_logs.s3.prefix":