Skip to content
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

Rule ID AC_AWS_0214 relies on deprecated Terraform code #1603

Open
lisenet opened this issue Aug 16, 2023 · 0 comments
Open

Rule ID AC_AWS_0214 relies on deprecated Terraform code #1603

lisenet opened this issue Aug 16, 2023 · 0 comments

Comments

@lisenet
Copy link

lisenet commented Aug 16, 2023

  • terrascan version: 1.18.3
  • Operating System: Ubuntu 20.04 LTS

Description

Terrascan relies on deprecated Terraform code.

What I Did

Using S3 versioning in Terraform resource "aws_s3_bucket" is deprecated, the correct way is to use the resource aws_s3_bucket_versioning instead.

Example Terraform code that is used in this case:

resource "aws_s3_bucket" "example" {
  bucket   = "example"
}

resource "aws_s3_bucket_versioning" "example" {
  bucket   = aws_s3_bucket.example.id

  versioning_configuration {
    status = "Enabled"
  }
}

Terrascan incorrectly assumes that S3 versioning has not been enabled, when it has.

	Description    :	Enabling S3 versioning will enable easy recovery from both unintended user actions, like deletes and overwrites
	File           :	example/s3.tf
	Module Name    :	root
	Plan Root      :	example
	Line           :	1
	Severity       :	HIGH
	Rule Name      :	s3Versioning
	Rule ID        :	AC_AWS_0214
	Resource Name  :	example
	Resource Type  :	aws_s3_bucket
	Category       :	Resilience
@lisenet lisenet changed the title Rule AC_AWS_0214 relies on deprecated Terraform code Rule ID AC_AWS_0214 relies on deprecated Terraform code Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant