terraform:S6252 False Positive versioning

Hello Languages Team :wave:

Versioning in aws_s3_bucket ressource is deprecated as it can now be configured in its own ressource (aws_s3_bucket_versioning) as stated here.
Sadly terraform:S6252 does not recognise this new approach and expects the deprecated notation in order to have a compliant solution. For the time being both options should be valid until the versioning notation in aws_s3_bucket is removed

Reproducer in SQ 9.4.54424:

resource "aws_s3_bucket_versioning" "versioning_example" {
  bucket = aws_s3_bucket.example_bucket.id
  versioning_configuration {
    status = "Enabled"

resource "aws_s3_bucket" "example_bucket" {
  bucket = "test-bucket"

Thanks :slight_smile:

Hey team,

Any confirmation of this issue?

Hi @DefinitelyNotTobi,

Sorry for the late response. Indeed there are multiple deprecated parameters on the S3 bucket resource.
To address the false positive, I created a ticket. However, we have to check all deprecations and update other S3 buckets rules. Thank you very much for raising this topic.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.