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

docs: add more examples to filter.md for prefix/suffix #233

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

psedge
Copy link
Contributor

@psedge psedge commented Feb 9, 2021

Q A
πŸ› Bug fix? no
πŸš€ New feature? no
⚠ Deprecations? no
❌ BC Break no
πŸ”— Related issues 232
❓ Documentation yes

Description

I reached out on Discord asking about how to use wildcards in .driftignore and was pointed towards trying to use JMES filters first. This PR adds two new examples to filter.md which show use of starts_with and ends_with for filtering resources based on prefixes and suffixes respectively.

Use of the wildcard operator appears to be limited to iteration over a list as opposed to string matching on a property, so these functions might be the limit. I'd love if someone can prove me wrong though!

Attempted JMES:

!(Type=='aws_iam_role' && Id=='AWS*' - does not exclude aws_iam_role.AWSServiceRoleForX.

@psedge psedge requested a review from a team as a code owner February 9, 2021 14:05
@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #233 (4fb99be) into main (adb8d96) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #233   +/-   ##
=======================================
  Coverage   69.76%   69.76%           
=======================================
  Files         216      216           
  Lines        4829     4829           
=======================================
  Hits         3369     3369           
  Misses       1190     1190           
  Partials      270      270           

@eliecharra eliecharra added the kind/documentation Improvements or additions to documentation label Feb 9, 2021
@eliecharra
Copy link
Contributor

Thanks a lot for theses tests and explanations πŸ™πŸ» Very clear

@eliecharra eliecharra merged commit 5359c38 into snyk:main Feb 9, 2021
@eliecharra
Copy link
Contributor

@all-contributors please add @psedge for doc

@allcontributors
Copy link
Contributor

@eliecharra

I've put up a pull request to add @psedge! πŸŽ‰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants