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

f/aws_ecr_image - add image_tag_regex option #38783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

plentydone
Copy link

@plentydone plentydone commented Aug 9, 2024

Description

Add image_tag_regex option to aws_ecr_image for the purposes of filtering the list of images retrieved from a repository before choosing the latest. The idea is that you might have images tagged develop-(commit hash) or (branch)-(commit hash) or v1.2.0 all in one repository, and it is sometimes convenient to be able to choose the latest image matching a given pattern. I didn't see an option in the AWS API that covers it.

(this PR previously added image_tag_prefix, but I updated it to image_tag_regex after @jseiser pointed out prior art for such a feature)

Output from Acceptance Testing

% make testacc TESTS=TestAccECRImageDataSource_basic PKG=ecr
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRImageDataSource_basic'  -timeout 360m
=== RUN   TestAccECRImageDataSource_basic
=== PAUSE TestAccECRImageDataSource_basic
=== CONT  TestAccECRImageDataSource_basic
--- PASS: TestAccECRImageDataSource_basic (12.79s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        12.895s

@plentydone plentydone requested a review from a team as a code owner August 9, 2024 04:07
Copy link

github-actions bot commented Aug 9, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecr Issues and PRs that pertain to the ecr service. needs-triage Waiting for first response or review from a maintainer. labels Aug 9, 2024
@plentydone plentydone marked this pull request as draft August 9, 2024 04:09
Copy link

github-actions bot commented Aug 9, 2024

Thank you for your contribution! 🚀

Please note that the CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @plentydone 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@plentydone plentydone changed the title Draft: f/aws_ecr_image - add image_tag_prefix option f/aws_ecr_image - add image_tag_prefix option Aug 9, 2024
@plentydone plentydone marked this pull request as ready for review August 9, 2024 04:18
@plentydone plentydone force-pushed the f-aws_ecr_image-image_tag_prefix branch from b1fa653 to 7198b98 Compare August 11, 2024 03:32
@plentydone plentydone changed the title f/aws_ecr_image - add image_tag_prefix option f/aws_ecr_image - add image_tag_regex option Aug 11, 2024
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ecr Issues and PRs that pertain to the ecr service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants