-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Ability to configure S3 buckets based on variables #716
Comments
👍 having a fundamental building block of DRY configuration be completely unusable with a large subset of resources is a huge detriment to the project |
+1 |
Same thing for Bucket logging, cors_rule, etc...
It would be perfect to have this as separate resource types, but the ability of turning them on/off with count works perfectly as well 👍 |
Hi folks 👋 This issue is resolved in Terraform 0.12 and later, which supports new functionality in the configuration language aimed at solving problems like these. The new If you're looking for general assistance with how to implement Please do note that we are anticipating that we will likely split out the |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @zenitraM as hashicorp/terraform#13938. It was migrated here as part of the provider split. The original body of the issue is below.
We want to create a module to be able to reuse some specifics about the way we create S3 buckets.
However, there is no way to programatically define the existence of resource object fields (even just hashicorp/terraform#7034 could work at a certain extent) to be able to, for example, toggle on and off the replication policy of a bucket depending on an input variable:
or add multiple rules depending on an input array.
A way to solve this could be to add a different attachment resources for configurations applied to S3 buckets, i.e:
aws_s3_replication_configuration
- they are, after all, a separate API.Same applies to lifecycle policies and logging, for example - you cannot modularize a bucket conditionally having them without making separate modules for buckets with/without them.
The text was updated successfully, but these errors were encountered: