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

New Resource: aws_ecr_pull_through_cache_rule #22172

Merged
merged 4 commits into from
Dec 13, 2021

Conversation

roberth-k
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #21951

Implementation of registry_id follows the same pattern as aws_ecr_repository.

Output from acceptance testing:

$ make testacc PKG=ecr TESTS=TestAccPullThroughCacheRule_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccPullThroughCacheRule_' -timeout 180m
=== RUN   TestAccPullThroughCacheRule_basic
=== PAUSE TestAccPullThroughCacheRule_basic
=== RUN   TestAccPullThroughCacheRule_disappears
=== PAUSE TestAccPullThroughCacheRule_disappears
=== RUN   TestAccPullThroughCacheRule_failWhenAlreadyExists
=== PAUSE TestAccPullThroughCacheRule_failWhenAlreadyExists
=== CONT  TestAccPullThroughCacheRule_basic
=== CONT  TestAccPullThroughCacheRule_failWhenAlreadyExists
=== CONT  TestAccPullThroughCacheRule_disappears
--- PASS: TestAccPullThroughCacheRule_failWhenAlreadyExists (15.04s)
--- PASS: TestAccPullThroughCacheRule_disappears (17.12s)
--- PASS: TestAccPullThroughCacheRule_basic (22.22s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ecr        24.076s

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/ecr Issues and PRs that pertain to the ecr service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. labels Dec 10, 2021
@roberth-k roberth-k force-pushed the f-aws_ecr_pull_through_cache_rule branch from bb945e8 to b4f12b8 Compare December 10, 2021 22:07
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 13, 2021
@ewbankkit ewbankkit added the new-resource Introduces a new resource. label Dec 13, 2021
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 🚀.

Commercial
% make testacc PKG=ecr TESTS=TestAccPullThroughCacheRule_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccPullThroughCacheRule_' -timeout 180m
=== RUN   TestAccPullThroughCacheRule_basic
=== PAUSE TestAccPullThroughCacheRule_basic
=== RUN   TestAccPullThroughCacheRule_disappears
=== PAUSE TestAccPullThroughCacheRule_disappears
=== RUN   TestAccPullThroughCacheRule_failWhenAlreadyExists
=== PAUSE TestAccPullThroughCacheRule_failWhenAlreadyExists
=== CONT  TestAccPullThroughCacheRule_basic
=== CONT  TestAccPullThroughCacheRule_failWhenAlreadyExists
=== CONT  TestAccPullThroughCacheRule_disappears
--- PASS: TestAccPullThroughCacheRule_failWhenAlreadyExists (10.56s)
--- PASS: TestAccPullThroughCacheRule_disappears (12.85s)
--- PASS: TestAccPullThroughCacheRule_basic (16.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecr	20.197s
GovCloud
% make testacc PKG=ecr TESTS=TestAccPullThroughCacheRule_     
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecr/... -v -count 1 -parallel 20 -run='TestAccPullThroughCacheRule_' -timeout 180m
=== RUN   TestAccPullThroughCacheRule_basic
=== PAUSE TestAccPullThroughCacheRule_basic
=== RUN   TestAccPullThroughCacheRule_disappears
=== PAUSE TestAccPullThroughCacheRule_disappears
=== RUN   TestAccPullThroughCacheRule_failWhenAlreadyExists
    pull_through_cache_rule_test.go:74: ECR Pull Through Cache Rule is not supported in GovCloud partition
--- SKIP: TestAccPullThroughCacheRule_failWhenAlreadyExists (0.00s)
=== CONT  TestAccPullThroughCacheRule_basic
=== CONT  TestAccPullThroughCacheRule_disappears
    acctest.go:960: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: error creating ECR Pull Through Cache Rule (tf-test-gujssfrf): ValidationException: This feature is disabled
        
          with aws_ecr_pull_through_cache_rule.test,
          on terraform_plugin_test.tf line 2, in resource "aws_ecr_pull_through_cache_rule" "test":
           2: resource "aws_ecr_pull_through_cache_rule" "test" {
        
=== CONT  TestAccPullThroughCacheRule_basic
    acctest.go:960: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: error creating ECR Pull Through Cache Rule (tf-test-sft21ejl): ValidationException: This feature is disabled
        
          with aws_ecr_pull_through_cache_rule.test,
          on terraform_plugin_test.tf line 2, in resource "aws_ecr_pull_through_cache_rule" "test":
           2: resource "aws_ecr_pull_through_cache_rule" "test" {
        
--- SKIP: TestAccPullThroughCacheRule_disappears (7.82s)
--- SKIP: TestAccPullThroughCacheRule_basic (7.84s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecr	11.317s

@ewbankkit
Copy link
Contributor

@roberth-k Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 55d8f86 into hashicorp:main Dec 13, 2021
@github-actions github-actions bot added this to the v3.70.0 milestone Dec 13, 2021
@github-actions
Copy link

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

@roberth-k roberth-k deleted the f-aws_ecr_pull_through_cache_rule branch January 16, 2022 20:21
@github-actions
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 May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/ecr Issues and PRs that pertain to the ecr 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.

New resource: aws_ecr_pull_through_cache_rule
2 participants