s3 module terraform warnings refactor #302
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
S3 module the resource aws_s3_bucket has attributes logging, lifecycle_rule, cors_rule ,acl andversioning that should be in separate resources. The grants should be defined in the iam policy
Refactoring the grants policy is not as simple as other resource changes. As the tdr-terrafom-module/s3 is to be deprecated a partial solution that covers the only case where canonical-user-grants variable has been used is provided so the warnings will disappear. The code is commented to explain the variable use/limitation
The vpc = true argument used to indicate that the EIP was associated with a VPC, but since AWS introduced this as the default behaviour, the attribute is redundant and has been removed from newer versions of the Terraform AWS Provider.