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_ecrpublic_repository_policy #16901

Merged
merged 23 commits into from
Dec 16, 2021

Conversation

breathingdust
Copy link
Member

@breathingdust breathingdust commented Dec 24, 2020

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 #16540

Release note for CHANGELOG:

* **New Resource:** `aws_ecrpublic_repository_policy` 

Output from acceptance testing:

make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcrPublicRepositoryPolicy_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEcrPublicRepositoryPolicy_ -timeout 180m
=== RUN   TestAccAWSEcrPublicRepositoryPolicy_basic
=== PAUSE TestAccAWSEcrPublicRepositoryPolicy_basic
=== RUN   TestAccAWSEcrPublicRepositoryPolicy_iam
=== PAUSE TestAccAWSEcrPublicRepositoryPolicy_iam
=== CONT  TestAccAWSEcrPublicRepositoryPolicy_basic
=== CONT  TestAccAWSEcrPublicRepositoryPolicy_iam
--- PASS: TestAccAWSEcrPublicRepositoryPolicy_basic (34.82s)
--- PASS: TestAccAWSEcrPublicRepositoryPolicy_iam (43.79s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       46.488s

@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/ecrpublic Issues and PRs that pertain to the ecrpublic service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 24, 2020
@breathingdust breathingdust added the new-resource Introduces a new resource. label Dec 24, 2020
Base automatically changed from master to main January 23, 2021 01:00
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. labels Mar 18, 2021
@breathingdust breathingdust reopened this Mar 18, 2021
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. size/XS Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. size/XL Managed by automation to categorize the size of a PR. labels Mar 18, 2021
@pgacek
Copy link

pgacek commented Jun 8, 2021

Hi - any ideas when it's gonna be released?

@breathingdust breathingdust marked this pull request as ready for review June 19, 2021 03:31
@ewbankkit
Copy link
Contributor

The XAT001: missing ErrorCheck awsproviderlint errors can be addressed by replacing

		PreCheck:     func() { testAccPreCheck(t); testAccPreCheckAwsEcrPublic(t) },

with

		PreCheck:     func() { testAccPreCheck(t); testAccPreCheckAwsEcrPublic(t) },
		ErrorCheck:   testAccErrorCheck(t, ecrpublic.EndpointsID),

@ewbankkit
Copy link
Contributor

Need to add a .changelog/16901.txt file.

@aquam8
Copy link

aquam8 commented Jul 2, 2021

Thank you for trying to complete this PR 👍

@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@breathingdust
Copy link
Member Author

Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon!

@breathingdust breathingdust added this to the Roadmap milestone Nov 10, 2021
breathingdust and others added 10 commits November 22, 2021 14:35
…icyCreate' and 'resourceRepositoryPolicyUpdate' into 'resourceRepositoryPolicyPut'.

Acceptance test output:

% AWS_DEFAULT_REGION=us-east-1 make testacc TESTS=TestAccAWSEcrPublicRepositoryPolicy_ PKG=ecrpublic
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccAWSEcrPublicRepositoryPolicy_' -timeout 180m
=== RUN   TestAccAWSEcrPublicRepositoryPolicy_basic
=== PAUSE TestAccAWSEcrPublicRepositoryPolicy_basic
=== RUN   TestAccAWSEcrPublicRepositoryPolicy_policy
=== PAUSE TestAccAWSEcrPublicRepositoryPolicy_policy
=== RUN   TestAccAWSEcrPublicRepositoryPolicy_iam
=== PAUSE TestAccAWSEcrPublicRepositoryPolicy_iam
=== CONT  TestAccAWSEcrPublicRepositoryPolicy_basic
=== CONT  TestAccAWSEcrPublicRepositoryPolicy_iam
=== CONT  TestAccAWSEcrPublicRepositoryPolicy_policy
--- PASS: TestAccAWSEcrPublicRepositoryPolicy_basic (17.46s)
--- PASS: TestAccAWSEcrPublicRepositoryPolicy_policy (26.84s)
--- PASS: TestAccAWSEcrPublicRepositoryPolicy_iam (38.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic	43.908s
…icy_disappears' and 'TestAccECRPublicRepositoryPolicy_Disappears_repository', remove 'TestAccECRPublicRepositoryPolicy_policy'.

Acceptance test output:

% AWS_DEFAULT_REGION=us-east-1 make testacc TESTS=TestAccECRPublicRepositoryPolicy_ PKG=ecrpublic
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicRepositoryPolicy_' -timeout 180m
=== RUN   TestAccECRPublicRepositoryPolicy_basic
=== PAUSE TestAccECRPublicRepositoryPolicy_basic
=== RUN   TestAccECRPublicRepositoryPolicy_disappears
=== PAUSE TestAccECRPublicRepositoryPolicy_disappears
=== RUN   TestAccECRPublicRepositoryPolicy_Disappears_repository
=== PAUSE TestAccECRPublicRepositoryPolicy_Disappears_repository
=== RUN   TestAccECRPublicRepositoryPolicy_iam
=== PAUSE TestAccECRPublicRepositoryPolicy_iam
=== CONT  TestAccECRPublicRepositoryPolicy_basic
=== CONT  TestAccECRPublicRepositoryPolicy_disappears
=== CONT  TestAccECRPublicRepositoryPolicy_Disappears_repository
=== CONT  TestAccECRPublicRepositoryPolicy_iam
--- PASS: TestAccECRPublicRepositoryPolicy_Disappears_repository (10.91s)
--- PASS: TestAccECRPublicRepositoryPolicy_disappears (12.35s)
--- PASS: TestAccECRPublicRepositoryPolicy_basic (20.68s)
--- PASS: TestAccECRPublicRepositoryPolicy_iam (31.70s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic	35.397s
Acceptance test output:

% AWS_DEFAULT_REGION=us-east-1 make testacc TESTS=TestAccECRPublicRepositoryPolicy_ PKG=ecrpublic
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicRepositoryPolicy_' -timeout 180m
=== RUN   TestAccECRPublicRepositoryPolicy_basic
=== PAUSE TestAccECRPublicRepositoryPolicy_basic
=== RUN   TestAccECRPublicRepositoryPolicy_disappears
=== PAUSE TestAccECRPublicRepositoryPolicy_disappears
=== RUN   TestAccECRPublicRepositoryPolicy_Disappears_repository
=== PAUSE TestAccECRPublicRepositoryPolicy_Disappears_repository
=== RUN   TestAccECRPublicRepositoryPolicy_iam
=== PAUSE TestAccECRPublicRepositoryPolicy_iam
=== CONT  TestAccECRPublicRepositoryPolicy_basic
=== CONT  TestAccECRPublicRepositoryPolicy_iam
=== CONT  TestAccECRPublicRepositoryPolicy_disappears
=== CONT  TestAccECRPublicRepositoryPolicy_Disappears_repository
--- PASS: TestAccECRPublicRepositoryPolicy_Disappears_repository (14.92s)
--- PASS: TestAccECRPublicRepositoryPolicy_disappears (16.57s)
--- PASS: TestAccECRPublicRepositoryPolicy_basic (27.85s)
--- PASS: TestAccECRPublicRepositoryPolicy_iam (40.11s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic	46.285s
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 🚀.

% AWS_DEFAULT_REGION=us-east-1 make testacc TESTS=TestAccECRPublicRepositoryPolicy_ PKG=ecrpublic
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run='TestAccECRPublicRepositoryPolicy_' -timeout 180m
=== RUN   TestAccECRPublicRepositoryPolicy_basic
=== PAUSE TestAccECRPublicRepositoryPolicy_basic
=== RUN   TestAccECRPublicRepositoryPolicy_disappears
=== PAUSE TestAccECRPublicRepositoryPolicy_disappears
=== RUN   TestAccECRPublicRepositoryPolicy_Disappears_repository
=== PAUSE TestAccECRPublicRepositoryPolicy_Disappears_repository
=== RUN   TestAccECRPublicRepositoryPolicy_iam
=== PAUSE TestAccECRPublicRepositoryPolicy_iam
=== CONT  TestAccECRPublicRepositoryPolicy_basic
=== CONT  TestAccECRPublicRepositoryPolicy_iam
=== CONT  TestAccECRPublicRepositoryPolicy_disappears
=== CONT  TestAccECRPublicRepositoryPolicy_Disappears_repository
--- PASS: TestAccECRPublicRepositoryPolicy_Disappears_repository (14.92s)
--- PASS: TestAccECRPublicRepositoryPolicy_disappears (16.57s)
--- PASS: TestAccECRPublicRepositoryPolicy_basic (27.85s)
--- PASS: TestAccECRPublicRepositoryPolicy_iam (40.11s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic	46.285s

@ewbankkit ewbankkit merged commit ef06e41 into main Dec 16, 2021
@ewbankkit ewbankkit deleted the f-ecrpublic-repository-policy branch December 16, 2021 20:54
@github-actions github-actions bot modified the milestones: Roadmap, v3.70.0 Dec 16, 2021
github-actions bot pushed a commit that referenced this pull request Dec 16, 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!

@github-actions
Copy link

github-actions bot commented Jun 1, 2022

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, 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/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.

Support Managing ECR Public Repository Policy
5 participants