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

✨ Add support for comma-separated values on the same key for EC2 tag filters #4742

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

VasilSirakov
Copy link
Contributor

@VasilSirakov VasilSirakov commented Oct 11, 2024

Closes #4739

This adds the possibility of specifying comma-separated values for the same key in a include/exclude tag filter. Those filters can now be specified as follows:

ec2:tag:Name=name1,name2,name3

and

exclude:ec2:tag:Name=name1,name2,name3

We keep treating the filter as a single key : value so this is backwards compatible. We just expand the string value right before applying the filters.

Note:

There is a quirk with how filters are applied. Comma-separated values on the same key are applied with a logical OR. If we specify 2 tag filters on different keys, they are applied with a logical AND.

@VasilSirakov VasilSirakov marked this pull request as ready for review October 11, 2024 07:55
Copy link
Contributor

github-actions bot commented Oct 11, 2024

Test Results

3 116 tests  +2   3 115 ✅ +2   1m 27s ⏱️ -1s
  371 suites ±0       1 💤 ±0 
   28 files   ±0       0 ❌ ±0 

Results for commit 250830f. ± Comparison against base commit a2fd4fd.

♻️ This comment has been updated with latest results.

Signed-off-by: Vasil Sirakov <[email protected]>
@VasilSirakov VasilSirakov merged commit 767de8c into main Oct 14, 2024
14 of 15 checks passed
@VasilSirakov VasilSirakov deleted the vasil/multi-value-tag-filters branch October 14, 2024 07:11
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for multi-value EC2 tag filtering
3 participants