tflint-ruleset-aws icon indicating copy to clipboard operation
tflint-ruleset-aws copied to clipboard

No s3 global endpoint rule

Open AleksaC opened this issue 2 years ago • 2 comments

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.

AleksaC avatar Jun 16 '23 19:06 AleksaC

Are you interested in finishing this?

bendrucker avatar Jul 12 '23 23:07 bendrucker

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.

AleksaC avatar Jul 13 '23 10:07 AleksaC