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

Fix ecr_repository_prefix validation in aws_ecr_pull_through_cache_rule #34716

Conversation

hikaru7719
Copy link
Contributor

Description

Fixes validation of ecr_repository_prefix in aws_ecr_pull_through_cache_rule.
Referred to the latest AWS documentation and corrected the string size and regular expression pattern for ecr_repository_prefix.

Relations

Closes #34516

References

Output from Acceptance Testing

% make testacc TESTS=TestAccECRPullThroughCacheRule_ PKG=ecr          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRPullThroughCacheRule_'  -timeout 360m
=== RUN   TestAccECRPullThroughCacheRule_basic
=== PAUSE TestAccECRPullThroughCacheRule_basic
=== RUN   TestAccECRPullThroughCacheRule_disappears
=== PAUSE TestAccECRPullThroughCacheRule_disappears
=== RUN   TestAccECRPullThroughCacheRule_failWhenAlreadyExists
=== PAUSE TestAccECRPullThroughCacheRule_failWhenAlreadyExists
=== RUN   TestAccECRPullThroughCacheRule_ecrRepositoryPrefixWithSlash
=== PAUSE TestAccECRPullThroughCacheRule_ecrRepositoryPrefixWithSlash
=== CONT  TestAccECRPullThroughCacheRule_basic
=== CONT  TestAccECRPullThroughCacheRule_failWhenAlreadyExists
=== CONT  TestAccECRPullThroughCacheRule_disappears
=== CONT  TestAccECRPullThroughCacheRule_ecrRepositoryPrefixWithSlash
--- PASS: TestAccECRPullThroughCacheRule_failWhenAlreadyExists (76.76s)
--- PASS: TestAccECRPullThroughCacheRule_disappears (78.29s)
--- PASS: TestAccECRPullThroughCacheRule_ecrRepositoryPrefixWithSlash (86.24s)
--- PASS: TestAccECRPullThroughCacheRule_basic (89.38s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        89.466s
% make testacc TESTS=TestAccECRPullThroughCacheRuleDataSource_ PKG=ecr
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRPullThroughCacheRuleDataSource_'  -timeout 360m
=== RUN   TestAccECRPullThroughCacheRuleDataSource_basic
=== PAUSE TestAccECRPullThroughCacheRuleDataSource_basic
=== RUN   TestAccECRPullThroughCacheRuleDataSource_ecrRepositoryPrefixWithSlash
=== PAUSE TestAccECRPullThroughCacheRuleDataSource_ecrRepositoryPrefixWithSlash
=== CONT  TestAccECRPullThroughCacheRuleDataSource_basic
=== CONT  TestAccECRPullThroughCacheRuleDataSource_ecrRepositoryPrefixWithSlash
--- PASS: TestAccECRPullThroughCacheRuleDataSource_basic (92.56s)
--- PASS: TestAccECRPullThroughCacheRuleDataSource_ecrRepositoryPrefixWithSlash (92.84s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        92.921s

Copy link

github-actions bot commented Dec 4, 2023

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 size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecr Issues and PRs that pertain to the ecr service. labels Dec 4, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2023
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 6, 2023
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jar-b jar-b self-assigned this Dec 11, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 11, 2023
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 testacc PKG=ecr TESTS="TestAccECRPullThroughCacheRule_|TestAccECRPullThroughCacheRuleDataSource_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccECRPullThroughCacheRule_|TestAccECRPullThroughCacheRuleDataSource_'  -timeout 360m

--- PASS: TestAccECRPullThroughCacheRule_failWhenAlreadyExists (38.97s)
--- PASS: TestAccECRPullThroughCacheRule_disappears (40.54s)
--- PASS: TestAccECRPullThroughCacheRule_repositoryPrefixWithSlash (44.50s)
--- PASS: TestAccECRPullThroughCacheRule_basic (48.29s)
--- PASS: TestAccECRPullThroughCacheRuleDataSource_basic (61.69s)
--- PASS: TestAccECRPullThroughCacheRuleDataSource_repositoryPrefixWithSlash (62.41s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        65.740s

@jar-b jar-b merged commit 15451a6 into hashicorp:main Dec 11, 2023
36 checks passed
@github-actions github-actions bot added this to the v5.31.0 milestone Dec 11, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Dec 15, 2023
Copy link

This functionality has been released in v5.31.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!

Copy link

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 Jan 15, 2024
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/ecr Issues and PRs that pertain to the ecr service. size/M 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.

[Bug]: ecr_pull_through_cache_rule validation is too strict
4 participants