Skip to content

Commit

Permalink
Merge pull request #233 from psedge/issue_232_filtering_driftignore
Browse files Browse the repository at this point in the history
docs: add more examples to filter.md for prefix/suffix
  • Loading branch information
eliecharra authored Feb 9, 2021
2 parents f55e41b + 4fb99be commit 5359c38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/cmd/scan/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ driftctl scan --filter $'!(Type==\'aws_s3_bucket\' && Attr.Tags.terraform==\'fal

# Ignore buckets that don't have tag terraform
driftctl scan --filter $'!(Type==\'aws_s3_bucket\' && Attr.Tags != null && !contains(keys(Attr.Tags), \'terraform\'))'

# Ignore buckets with an ID prefix of 'terraform-'
driftctl scan --filter $'!(Type==\'aws_s3_bucket\' && starts_with(Id, \'terraform-\'))'

# Ignore buckets with an ID suffix of '-test'
driftctl scan --filter $'!(Type==\'aws_s3_bucket\' && ends_with(Id, \'-test\'))'

```

0 comments on commit 5359c38

Please sign in to comment.