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

Added image scanning configuration to aws_ecr_repository resource #10671

Merged
merged 1 commit into from
Oct 31, 2019
Merged

Added image scanning configuration to aws_ecr_repository resource #10671

merged 1 commit into from
Oct 31, 2019

Conversation

sergei-ivanov
Copy link
Contributor

@sergei-ivanov sergei-ivanov commented Oct 30, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #10656

Release note for CHANGELOG:

Adds `image_scanning_configuration` to `aws_ecr_repository` resource

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEcrRepository_image_scanning_configuration'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSEcrRepository_image_scanning_configuration -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSEcrRepository_image_scanning_configuration
=== PAUSE TestAccAWSEcrRepository_image_scanning_configuration
=== CONT  TestAccAWSEcrRepository_image_scanning_configuration
--- PASS: TestAccAWSEcrRepository_image_scanning_configuration (40.93s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	40.956s
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/flatmap	0.029s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags	0.004s [no tests to run]

@sergei-ivanov sergei-ivanov requested a review from a team October 30, 2019 02:15
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ecr Issues and PRs that pertain to the ecr service. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 30, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 30, 2019
@bflad bflad added this to the v2.34.0 milestone Oct 30, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi @sergei-ivanov 👋 Thank you very much for submitting this. A few minor things and this should be good to go. Please reach out if you have any questions or do not have time to implement the feedback.

aws/resource_aws_ecr_repository_test.go Show resolved Hide resolved
aws/resource_aws_ecr_repository_test.go Outdated Show resolved Hide resolved
website/docs/r/ecr_repository.html.markdown Outdated Show resolved Hide resolved
website/docs/r/ecr_repository.html.markdown Outdated Show resolved Hide resolved
aws/resource_aws_ecr_repository.go Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 30, 2019
@sergei-ivanov sergei-ivanov changed the title Added image scanning configuration to aws_ecr_repository resource [WIP] Added image scanning configuration to aws_ecr_repository resource Oct 30, 2019
@sergei-ivanov
Copy link
Contributor Author

@bflad I have implemented the requested changes, and improved the test further (in my test environment I also tested it for compatibility with resources created by an earlier version of aws provider).

Here's the result of a test run with the latest code:

$ make testacc TESTARGS='-run=TestAccAWSEcrRepository_image_scanning_configuration'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSEcrRepository_image_scanning_configuration -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSEcrRepository_image_scanning_configuration
=== PAUSE TestAccAWSEcrRepository_image_scanning_configuration
=== CONT  TestAccAWSEcrRepository_image_scanning_configuration
--- PASS: TestAccAWSEcrRepository_image_scanning_configuration (95.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	95.072s
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/flatmap	0.003s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags	0.005s [no tests to run]

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Oct 30, 2019
@sergei-ivanov sergei-ivanov changed the title [WIP] Added image scanning configuration to aws_ecr_repository resource Added image scanning configuration to aws_ecr_repository resource Oct 30, 2019
@bflad bflad self-requested a review October 31, 2019 01:25
@bflad bflad self-assigned this Oct 31, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

This looks great, thanks for the quick implementation and updates, @sergei-ivanov 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSEcrRepositoryPolicy_basic (8.78s)
--- PASS: TestAccAWSEcrRepository_basic (9.01s)
--- PASS: TestAccAWSEcrRepository_immutability (9.54s)
--- PASS: TestAccAWSEcrRepository_tags (13.60s)
--- PASS: TestAccAWSEcrRepository_image_scanning_configuration (20.62s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (26.18s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSEcrRepository_immutability (5.62s)
--- PASS: TestAccAWSEcrRepository_basic (5.92s)
--- PASS: TestAccAWSEcrRepositoryPolicy_basic (5.97s)
--- PASS: TestAccAWSEcrRepository_tags (6.91s)
--- PASS: TestAccAWSEcrRepository_image_scanning_configuration (8.65s)
--- PASS: TestAccAWSEcrRepositoryPolicy_iam (11.49s)

@bflad bflad merged commit fa39739 into hashicorp:master Oct 31, 2019
bflad added a commit that referenced this pull request Oct 31, 2019
@bflad
Copy link
Contributor

bflad commented Oct 31, 2019

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

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
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. enhancement Requests to existing resources that expand the functionality or scope. 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.

Add support for ECR image scanning
2 participants