cloudposse / terraform-aws-cloudfront-cdn

Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
https://cloudposse.com/accelerate
Apache License 2.0
99 stars 121 forks source link

Support an already created bucket for logging #42

Closed krystan closed 3 years ago

krystan commented 3 years ago

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

Allow the specification of an existing logging bucket.

Expected Behavior

When a bucket is specified in the input variable the module should not create a bucket

Use Case

Baking in a logging bucket is great, but reduces flexibility, especially where centralised logging is a feature that is wanted (all logs in one central account). Allow a user to specify a bucket by variable and if it is specified stop the resource being created by the module itself.

Describe Ideal Solution

Variable introduced to specify the bucket by a domain name as current code allows and enabled flag should detect whether this is specified and if so set enabled to false on the log bucket resource. If no bucket name is specified (default setting) then current behaviour is maintained.

Alternatives Considered

Have to write my own code and not use this module or fork module and use fork, with the maintenance burden that entails.

Additional Context

N/A