Skip to content

Conversation

@tabito-hara
Copy link
Contributor

@tabito-hara tabito-hara commented Apr 8, 2025

Description

  • Add a test for aws_ecr_replication_configuration to verify that combined cross-account and cross-region destination configurations work correctly.
  • This test was motivated by ECR replication : cross both account and region rule configuration results in only a cross account rule #42155. While investigating the reported issue, I found that there was no existing test case covering both cross-account and cross-region replication together.
  • Passing the newly added test indicates that combined a cross-account and cross-region destination configuration works as expected with the current implementation.

Relations

Closes #42155

Output from Acceptance Testing

$ AWS_ALTERNATE_PROFILE=admin-alt AWS_PROFILE=admin make testacc TESTS=TestAccECRReplicationConfiguration_ PKG=ecr      
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRReplicationConfiguration_'  -timeout 360m -vet=off
2025/04/08 09:23:42 Initializing Terraform AWS Provider...
=== RUN   TestAccECRReplicationConfiguration_serial
=== PAUSE TestAccECRReplicationConfiguration_serial
=== CONT  TestAccECRReplicationConfiguration_serial
=== RUN   TestAccECRReplicationConfiguration_serial/basic
=== RUN   TestAccECRReplicationConfiguration_serial/disappears
=== RUN   TestAccECRReplicationConfiguration_serial/repositoryFilter
--- PASS: TestAccECRReplicationConfiguration_serial (140.72s)
    --- PASS: TestAccECRReplicationConfiguration_serial/basic (78.24s)
    --- PASS: TestAccECRReplicationConfiguration_serial/disappears (22.10s)
    --- PASS: TestAccECRReplicationConfiguration_serial/repositoryFilter (40.38s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        145.667s

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

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 needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecr Issues and PRs that pertain to the ecr service. size/S Managed by automation to categorize the size of a PR. labels Apr 8, 2025
@tabito-hara tabito-hara force-pushed the t-aws_ecr_replication_configuration-add_cross_account_test branch from 8d7745d to 4da140f Compare April 8, 2025 01:08
@tabito-hara tabito-hara marked this pull request as ready for review April 8, 2025 01:29
@tabito-hara tabito-hara requested a review from a team as a code owner April 8, 2025 01:29
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 14, 2025
@ewbankkit ewbankkit self-assigned this Apr 30, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 30, 2025
Copy link
Contributor

@ewbankkit ewbankkit 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 testacc TESTARGS='-run=TestAccECRReplicationConfiguration_serial/basic' PKG=ecr
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.8 test ./internal/service/ecr/... -v -count 1 -parallel 20  -run=TestAccECRReplicationConfiguration_serial/basic -timeout 360m -vet=off
2025/04/30 09:02:07 Initializing Terraform AWS Provider...
=== RUN   TestAccECRReplicationConfiguration_serial
=== PAUSE TestAccECRReplicationConfiguration_serial
=== CONT  TestAccECRReplicationConfiguration_serial
=== RUN   TestAccECRReplicationConfiguration_serial/basic
--- PASS: TestAccECRReplicationConfiguration_serial (57.92s)
    --- PASS: TestAccECRReplicationConfiguration_serial/basic (57.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecr	62.718s

@ewbankkit
Copy link
Contributor

@tabito-hara Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 7d561e6 into hashicorp:main Apr 30, 2025
41 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 v5.97.0 milestone Apr 30, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2025

This functionality has been released in v5.97.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2025

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 Jun 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

service/ecr Issues and PRs that pertain to the ecr service. size/S 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.

ECR replication : cross both account and region rule configuration results in only a cross account rule

3 participants