tflint-ruleset-aws
tflint-ruleset-aws copied to clipboard
No s3 global endpoint rule
Hi, I have an idea for a new rule. The idea is to disallow usage of s3 global endpoints which have been deprecated. The most notable issue caused by this is cloudfront redirecting to the regional endpoint for some time after the bucket has been created, as described here.
The aws_s3_bucket resource returns the global endpoint in bucket_domain_name output which is what my current implementation of the rule catches. However I'd also look for strings that contain something like bucketname.s3.amazonaws.com
This is a rough but working implementation of the rule, so I'm opening a draft PR to get your feedback before doing additional work. If you think this is a useful rule, I'll cover additional cases, clean up the code and add documentation.
Are you interested in finishing this?
Yes I am. This turned out to be harder to implement than I initially thought and things kept coming up for me so I didn't have time to take a proper look at it. I should have more time in the following few days so will try to pick it up again.