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

feat!: Allow multiple scan filters per scan type in registry; Raise MSV of Terraform and AWS provider to 1.0 and 5.0 respectively #29

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

vrnvikas
Copy link
Contributor

@vrnvikas vrnvikas commented Mar 11, 2024

Description

Increase the functionality of AWS ECR registry scan rules by implementing the capability to accommodate multiple scan filters per scan type, thereby enhancing the flexibility and customization options available for users.

Motivation and Context

This feature became essential during my work on a project where there was a requirement to incorporate multiple filters into the scaling configuration. However, this couldn't be accomplished with the existing implementation.

Breaking Changes

Yes, 'filter' parameter under 'registry_scan_rules,' which has now been renamed to 'filters,' and its data type has been altered from a string to an array of maps. Consequently, users relying on the existing implementation must update their 'registry_scan_rules' configuration to align with these changes in order to effectively utilize the updated features.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good, and we should make it as a major release since it contains a breaking change.

WDYT @bryantbiggs ?

main.tf Outdated
filter = rule.value.filter
filter_type = try(rule.value.filter_type, "WILDCARD")
dynamic "repository_filter" {
for_each = rule.value.filters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the plural form makes more sense, but it does throw users off - lets keep the current, singular form to avoid surprising folks:

Suggested change
for_each = rule.value.filters
for_each = rule.value.filter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added suggested change

@bryantbiggs
Copy link
Member

@vrnvikas can you also bump the minimum Terraform version to 1.0 and the minimum AWS provider version to 5.0 - This PR will be the major version bump, and then after we can merge #30 as a regular feature (minor version) release

@bryantbiggs bryantbiggs changed the title feat: Add support for multiple scan filters per scan type in registry… feat!: Allow multiple scan filters per scan type in registry; Raise MSV of Terraform and AWS provider to 1.0 and 5.0 respectively Mar 15, 2024
@vrnvikas
Copy link
Contributor Author

Minimum support versions raised for Terraform and AWS provider to 1.0 and 5.0 respectively.

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@bryantbiggs bryantbiggs merged commit cbba4fd into terraform-aws-modules:master Mar 15, 2024
6 checks passed
antonbabenko pushed a commit that referenced this pull request Mar 15, 2024
## [2.0.0](v1.7.1...v2.0.0) (2024-03-15)

### ⚠ BREAKING CHANGES

* Allow multiple scan filters per scan type in registry; Raise MSV of Terraform and AWS provider to 1.0 and 5.0 respectively (#29)

### Features

* Allow multiple scan filters per scan type in registry; Raise MSV of Terraform and AWS provider to 1.0 and 5.0 respectively ([#29](#29)) ([cbba4fd](cbba4fd))
@antonbabenko
Copy link
Member

This PR is included in version 2.0.0 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 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.

3 participants