Skip to content

Conversation

@anurag-hashicorp
Copy link
Contributor

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

  • Add new data source aws_ecrpublic_images to retrieve the list of images in a specified public repository.

Relations

References

API_DescribeImages

Output from Acceptance Testing

terraform-provider-aws (main) ✗ cd /Users/anurag/hashicorp/terraform-provider-aws && AWS_DEFAULT_REGION=us-east-1 GO_VER=go make testacc PKG=ecrpublic TESTS=TestAccECRPublicImagesDataSource
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 main 🌿...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicImagesDataSource'  -timeout 360m -vet=off
2025/10/24 15:14:23 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/24 15:14:23 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccECRPublicImagesDataSource_basic
=== PAUSE TestAccECRPublicImagesDataSource_basic
=== RUN   TestAccECRPublicImagesDataSource_registryID
=== PAUSE TestAccECRPublicImagesDataSource_registryID
=== RUN   TestAccECRPublicImagesDataSource_registryIDValidation
=== PAUSE TestAccECRPublicImagesDataSource_registryIDValidation
=== CONT  TestAccECRPublicImagesDataSource_basic
=== CONT  TestAccECRPublicImagesDataSource_registryIDValidation
=== CONT  TestAccECRPublicImagesDataSource_registryID
--- PASS: TestAccECRPublicImagesDataSource_registryIDValidation (1.85s)
--- PASS: TestAccECRPublicImagesDataSource_basic (23.27s)
--- PASS: TestAccECRPublicImagesDataSource_registryID (23.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic  28.011s

- add datasource for ecrpublic `DescribeImages`
- add test
- add website documentation
@anurag-hashicorp anurag-hashicorp added the rnd-ind-provider rnd-ind-provider label Oct 24, 2025
@github-actions
Copy link
Contributor

Community Guidelines

This 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

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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/ecrpublic Issues and PRs that pertain to the ecrpublic service. generators Relates to code generators. size/XL Managed by automation to categorize the size of a PR. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 24, 2025
@anurag-hashicorp anurag-hashicorp marked this pull request as ready for review October 25, 2025 10:10
@anurag-hashicorp anurag-hashicorp requested a review from a team as a code owner October 25, 2025 10:10
@anurag-hashicorp anurag-hashicorp enabled auto-merge (squash) October 25, 2025 10:11
- Update changelog, docs
- Update datasource with flex `Flatten` and `Expand`
- Update changelog, docs
- Update datasource with flex `Flatten` and `Expand`
@anurag-hashicorp
Copy link
Contributor Author

Output from Acceptance tests:

terraform-provider-aws (f-aws_ecr_public-new-data-source) ✗ AWS_DEFAULT_REGION=us-east-1 GO_VER=go make testacc PKG=ecrpublic TESTS=TestAccECRPublicImagesDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ecr_public-new-data-source 🌿...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicImagesDataSource_'  -timeout 360m -vet=off
2025/10/28 17:38:23 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/28 17:38:23 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccECRPublicImagesDataSource_basic
=== PAUSE TestAccECRPublicImagesDataSource_basic
=== RUN   TestAccECRPublicImagesDataSource_registryID
=== PAUSE TestAccECRPublicImagesDataSource_registryID
=== RUN   TestAccECRPublicImagesDataSource_registryIDValidation
=== PAUSE TestAccECRPublicImagesDataSource_registryIDValidation
=== CONT  TestAccECRPublicImagesDataSource_basic
=== CONT  TestAccECRPublicImagesDataSource_registryIDValidation
=== CONT  TestAccECRPublicImagesDataSource_registryID
--- PASS: TestAccECRPublicImagesDataSource_registryIDValidation (1.93s)
--- PASS: TestAccECRPublicImagesDataSource_basic (22.65s)
--- PASS: TestAccECRPublicImagesDataSource_registryID (23.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic	28.156s

- Remove redundant ID attribute
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make t K=ecrpublic T=TestAccECRPublicImagesDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ecr_public-new-data-source 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicImagesDataSource_'  -timeout 360m -vet=off
2025/10/28 13:10:56 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/28 13:10:56 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccECRPublicImagesDataSource_registryIDValidation (1.38s)
--- PASS: TestAccECRPublicImagesDataSource_registryID (10.61s)
--- PASS: TestAccECRPublicImagesDataSource_basic (10.64s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic  17.404s

@anurag-hashicorp anurag-hashicorp merged commit 148d66e into hashicorp:main Oct 28, 2025
42 checks passed
@github-actions
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.19.0 milestone Oct 28, 2025
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. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. rnd-ind-provider rnd-ind-provider service/ecrpublic Issues and PRs that pertain to the ecrpublic service. size/XL Managed by automation to categorize the size of a PR. 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