Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Allow s3 logging from aws_s3_bucket_logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pguinard-public-com committed Apr 25, 2024
1 parent 1b66133 commit 1bc298e
Show file tree
Hide file tree
Showing 5 changed files with 983 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rego/rules/tf/aws/s3/bucket_access_logging.rego
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ resource_type := "MULTIPLE"

buckets := fugue.resources("aws_s3_bucket")

bucket_logging := fugue.resources("aws_s3_bucket_logging")

bucket_has_logging(bucket) {
_ = bucket.logging[_]
}

bucket_has_logging(bucket) {
bucket_logging_conf := bucket_logging[_]
bucket_logging_conf.bucket == bucket.id
}

bucket_has_logging(bucket) {
_ = lib.bucket_logging_by_bucket[lib.bucket_name_or_id(bucket)]
}
Expand Down
Loading

0 comments on commit 1bc298e

Please sign in to comment.