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: Add registry policy scope support for aws_ecr_account_setting #40772

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Jan 4, 2025

Description

This PR is to add support for setting registry policy scope via appropriate values for the name and value argument in the aws_ecr_account_setting resource.

Relations

Closes #40705

References

Referred to PutAccountSetting for specs and wordings.

Output from Acceptance Testing

$ make testacc TESTS=TestAccECRAccountSetting_serial PKG=ecr
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRAccountSetting_serial'  -timeout 360m
2025/01/04 04:12:19 Initializing Terraform AWS Provider...
=== RUN   TestAccECRAccountSetting_serial
=== PAUSE TestAccECRAccountSetting_serial
=== CONT  TestAccECRAccountSetting_serial
=== RUN   TestAccECRAccountSetting_serial/basic
=== RUN   TestAccECRAccountSetting_serial/registryPolicyScope
--- PASS: TestAccECRAccountSetting_serial (50.72s)
    --- PASS: TestAccECRAccountSetting_serial/basic (25.99s)
    --- PASS: TestAccECRAccountSetting_serial/registryPolicyScope (24.73s)

$

@acwwat acwwat requested a review from a team as a code owner January 4, 2025 09:29
Copy link

github-actions bot commented Jan 4, 2025

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. external-maintainer Contribution from a trusted external contributor. labels Jan 4, 2025
@acwwat acwwat force-pushed the f-aws_ecr_account_setting-add_reg_policy_scope_support branch 2 times, most recently from cc5aee4 to d20f7f8 Compare January 4, 2025 19:21
@acwwat acwwat force-pushed the f-aws_ecr_account_setting-add_reg_policy_scope_support branch from d20f7f8 to 860a985 Compare January 4, 2025 19:50
@ewbankkit ewbankkit 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 Jan 6, 2025
@ewbankkit ewbankkit self-assigned this Jan 6, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 6, 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=TestAccECRAccountSetting_serial' PKG=ecr
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ecr/... -v -count 1 -parallel 20  -run=TestAccECRAccountSetting_serial -timeout 360m
2025/01/06 09:37:23 Initializing Terraform AWS Provider...
=== RUN   TestAccECRAccountSetting_serial
=== PAUSE TestAccECRAccountSetting_serial
=== CONT  TestAccECRAccountSetting_serial
=== RUN   TestAccECRAccountSetting_serial/basic
=== RUN   TestAccECRAccountSetting_serial/registryPolicyScope
--- PASS: TestAccECRAccountSetting_serial (38.75s)
    --- PASS: TestAccECRAccountSetting_serial/basic (19.81s)
    --- PASS: TestAccECRAccountSetting_serial/registryPolicyScope (18.94s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecr	44.203s

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 1b0993d into hashicorp:main Jan 6, 2025
54 checks passed
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 6, 2025
Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 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. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. 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.

[Enhancement]: Allow setting extended ECR registry policy scope
2 participants