-
Notifications
You must be signed in to change notification settings - Fork 9.8k
data.aws_ecr_images add tag status filter, max results and describe image #44621
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
Open
psantus
wants to merge
13
commits into
hashicorp:main
Choose a base branch
from
psantus:feat/aws_ecr_images-add-properties
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
data.aws_ecr_images add tag status filter, max results and describe image #44621
psantus
wants to merge
13
commits into
hashicorp:main
from
psantus:feat/aws_ecr_images-add-properties
+271
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add tag_status attribute to schema (TAGGED/UNTAGGED/ANY) - Update data model and Read method to support ListImagesFilter - Add comprehensive tests for all tag_status values - Update documentation with examples
- Add max_results attribute to schema with int64 type - Update data model and Read method to set MaxResults on ListImagesInput - Add test for max_results functionality - Update documentation with example usage
- Add describe_images boolean attribute to schema (defaults to false) - Add image_details output attribute with detailed image information - Create imageDetailsModel struct for DescribeImages API response - Add findImagesDetails function with batching (max 100 images per request) - Update Read method to conditionally call DescribeImages when describe_images=true - Add comprehensive test for describe_images functionality - Update documentation with examples and detailed attribute descriptions
- Align struct field tags for consistency
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
Add changelog entry for ECR images data source enhancements: - tag_status filter (TAGGED/UNTAGGED/ANY) - max_results parameter - describe_images functionality with image_details output
Remove 'Defaults to ANY' from tag_status documentation as there is no default value set in the implementation. The parameter is optional and when not specified, the AWS API returns all images regardless of tag status.
- Use public ECR registry (amazonlinux) with real images for testing - Add testAccCheckECRImagesAllHaveTags validation function - Verify TAGGED filter returns only images with tags - Test now validates actual filtering behavior, not just parameter acceptance Addresses review feedback about test coverage for tag_status filtering.
Replace 'true' string literal with acctest.CtTrue constant in test to comply with semgrep rule ci.literal-True-string-test-constant
Remove extra spaces in attribute alignment to match terrafmt standards
Replace if statement with modern min() function for calculating batch end index in findImagesDetails function
Rename testAccCheckECRImagesAllHaveTags to testAccCheckImagesAllHaveTags to comply with semgrep rule ci.ecr-in-func-name
Function is no longer used after updating test to use public ECR registry
Replace traditional for loop with modern range over int syntax
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.
needs-triage
Waiting for first response or review from a maintainer.
service/ecr
Issues and PRs that pertain to the ecr service.
size/L
Managed by automation to categorize the size of a PR.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
N/A
Description
Improves data aws_ecr_images:
Relations
Fixes #40025
References
Output from Acceptance Testing