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

Allow s3 logging from aws_s3_bucket_logging #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pguinard-public-com
Copy link

Fixes #374

Sample from that pull request which also matches the code we have provided in tests:

Fixed behavior:

$ cat test.tf
resource "aws_s3_bucket" "bucket_new_syntax" {
  bucket = "bucket_new_syntax"
}

resource "aws_s3_bucket_logging" "bucket_new_syntax" {
  bucket = aws_s3_bucket.bucket_new_syntax.id

  target_bucket = aws_s3_bucket.logbucket.id
  target_prefix = "log/"
}

$ regula run --include $HOME/git/regula/rego/rules/tf/aws/s3/bucket_access_logging.rego --no-built-ins

No problems found. Good going.

Original behavior:

$ cat test.tf
resource "aws_s3_bucket" "bucket_new_syntax" {
  bucket = "bucket_new_syntax"
}

$ regula run --include $HOME/git/regula/rego/rules/tf/aws/s3/bucket_access_logging.rego --no-built-ins

FG_R00274: S3 bucket access logging should be enabled [Medium]
           https://docs.fugue.co/FG_R00274.html

  [1]: aws_s3_bucket.bucket_new_syntax
       in test.tf:1:1

Found one problem.

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

Successfully merging this pull request may close these issues.

[BUG] The policy FG_R00274 doesn't work with the new syntax (provider aws 4.x)
1 participant