mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-24 07:26:26 -06:00
Merge branch 'optimisticanshul-7721-enable-disable-access-logs'
This commit is contained in:
commit
d4589e2581
@ -127,6 +127,11 @@ func resourceAwsElb() *schema.Resource {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
"enabled": &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -520,7 +525,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||
} else if len(logs) == 1 {
|
||||
log := logs[0].(map[string]interface{})
|
||||
accessLog := &elb.AccessLog{
|
||||
Enabled: aws.Bool(true),
|
||||
Enabled: aws.Bool(log["enabled"].(bool)),
|
||||
EmitInterval: aws.Int64(int64(log["interval"].(int))),
|
||||
S3BucketName: aws.String(log["bucket"].(string)),
|
||||
}
|
||||
|
@ -374,6 +374,10 @@ func flattenAccessLog(l *elb.AccessLog) []map[string]interface{} {
|
||||
r["interval"] = *l.EmitInterval
|
||||
}
|
||||
|
||||
if l.Enabled != nil {
|
||||
r["enabled"] = *l.Enabled
|
||||
}
|
||||
|
||||
result = append(result, r)
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,7 @@ Access Logs (`access_logs`) support the following:
|
||||
* `bucket` - (Required) The S3 bucket name to store the logs in.
|
||||
* `bucket_prefix` - (Optional) The S3 bucket prefix. Logs are stored in the root if not configured.
|
||||
* `interval` - (Optional) The publishing interval in minutes. Default: 60 minutes.
|
||||
* `enabled` - (Optional) Boolean to enable / disable `access_logs`. Default is `true`
|
||||
|
||||
Listeners (`listener`) support the following:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user