terraform-aws-modules / terraform-aws-s3-bucket

Terraform module to create AWS S3 resources 🇺🇦

Home Page:https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add enabled flag for bucket logging for more comprehensive looping

jwitko opened this issue · comments

Is your request related to a problem? Please describe.

When iterating over a list of buckets to create in AWS S3 multiple module instantiations must be created with conditionals for buckets that desire logging and buckets that do not.

Describe the solution you'd like.

By adding an optional logging.enabled flag (defaulted to true) to the logging input we can reduce instantiations to a single instance which sets logging to false as necessary.

Describe alternatives you've considered.

The only current alternative is to instantiate the module twice and filter a for_each with a conditional based on whether or not the specific bucket requires logging.

Additional context

It'd just be really nice to have! Reduce code complexity, make the module more DRY, etc.

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

Not stale, just needs review.

I'm going to lock this issue because it has been closed for 30 days . This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.