You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
Hi @christophetd, thanks for reporting this! The PR you linked to only applies
to processing .tf files directly -- not to terraform plans.
One option would be for us to support more expressive string globs for waivers.
However, you can do something like that in rego as well. If you create a
waivers configuration like this:
package fugue.regula.config
import data.fugue.resource_view
# This grabs all resource IDs from the internal resource view.
all_resource_ids[id] {
single := input[_].content
resource_view.resource_view[id] with input as single
}
waivers[waiver] {
# Waive all IDs that match the regex.
all_resource_ids[id]
regex.match(`^aws_s3_bucket\.bucket\[[0-9]+\]$`, id)
waiver := {"resource_id": id, "rule_id": "FG_R00099"}
}
Say I'm creating a bunch of unencrypted S3 buckets:
and using regula to scan my Terraform plan:
And I want to suppress this rule for this specific resource
aws_s3_bucket.bucket[*]
resource. How can I achieve it?Waiving
aws_s3_bucket.bucket[0]
works but will only waive the failure for 1 resource. Same problem for resources created withfor_each
The text was updated successfully, but these errors were encountered: