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

r/aws_imagebuilder_component - add skip_destroy argument #28905

Merged

Conversation

kamilturek
Copy link
Collaborator

Description

This PR adds the skip_destroy argument to the aws_imagebuilder_component. This allows creating the new component versions without removing the current one and affecting all resources relying on it.

Followed the approach of aws_ecs_task_definition and aws_lambda_layer_version facing similar problems.

Relations

Closes #26117.

Output from Acceptance Testing

$ make testacc TESTARGS="-run=TestAccImageBuilderComponent_" PKG=imagebuilder ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/imagebuilder/... -v -count 1 -parallel 2  -run=TestAccImageBuilderComponent_ -timeout 180m
=== RUN   TestAccImageBuilderComponent_basic
=== PAUSE TestAccImageBuilderComponent_basic
=== RUN   TestAccImageBuilderComponent_disappears
=== PAUSE TestAccImageBuilderComponent_disappears
=== RUN   TestAccImageBuilderComponent_changeDescription
=== PAUSE TestAccImageBuilderComponent_changeDescription
=== RUN   TestAccImageBuilderComponent_description
=== PAUSE TestAccImageBuilderComponent_description
=== RUN   TestAccImageBuilderComponent_kmsKeyID
=== PAUSE TestAccImageBuilderComponent_kmsKeyID
=== RUN   TestAccImageBuilderComponent_Platform_windows
=== PAUSE TestAccImageBuilderComponent_Platform_windows
=== RUN   TestAccImageBuilderComponent_supportedOsVersions
=== PAUSE TestAccImageBuilderComponent_supportedOsVersions
=== RUN   TestAccImageBuilderComponent_tags
=== PAUSE TestAccImageBuilderComponent_tags
=== RUN   TestAccImageBuilderComponent_uri
=== PAUSE TestAccImageBuilderComponent_uri
=== CONT  TestAccImageBuilderComponent_basic
=== CONT  TestAccImageBuilderComponent_Platform_windows
--- PASS: TestAccImageBuilderComponent_Platform_windows (25.38s)
=== CONT  TestAccImageBuilderComponent_tags
--- PASS: TestAccImageBuilderComponent_basic (26.71s)
=== CONT  TestAccImageBuilderComponent_uri
--- PASS: TestAccImageBuilderComponent_uri (34.53s)
=== CONT  TestAccImageBuilderComponent_supportedOsVersions
--- PASS: TestAccImageBuilderComponent_tags (54.77s)
=== CONT  TestAccImageBuilderComponent_description
--- PASS: TestAccImageBuilderComponent_supportedOsVersions (24.83s)
=== CONT  TestAccImageBuilderComponent_kmsKeyID
--- PASS: TestAccImageBuilderComponent_description (27.40s)
=== CONT  TestAccImageBuilderComponent_changeDescription
--- PASS: TestAccImageBuilderComponent_kmsKeyID (27.46s)
=== CONT  TestAccImageBuilderComponent_disappears
--- PASS: TestAccImageBuilderComponent_disappears (16.54s)
--- PASS: TestAccImageBuilderComponent_changeDescription (23.24s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder       132.812s

@github-actions
Copy link

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 the size/M Managed by automation to categorize the size of a PR. label Jan 15, 2023
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jan 15, 2023
@kamilturek kamilturek added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 15, 2023
@kamilturek
Copy link
Collaborator Author

The failed CI check is not related to this PR.

@kamilturek kamilturek marked this pull request as ready for review January 15, 2023 21:04
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=TestAccImageBuilderComponent_' PKG=imagebuilder ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/imagebuilder/... -v -count 1 -parallel 3  -run=TestAccImageBuilderComponent_ -timeout 180m
=== RUN   TestAccImageBuilderComponent_basic
=== PAUSE TestAccImageBuilderComponent_basic
=== RUN   TestAccImageBuilderComponent_disappears
=== PAUSE TestAccImageBuilderComponent_disappears
=== RUN   TestAccImageBuilderComponent_changeDescription
=== PAUSE TestAccImageBuilderComponent_changeDescription
=== RUN   TestAccImageBuilderComponent_description
=== PAUSE TestAccImageBuilderComponent_description
=== RUN   TestAccImageBuilderComponent_kmsKeyID
=== PAUSE TestAccImageBuilderComponent_kmsKeyID
=== RUN   TestAccImageBuilderComponent_Platform_windows
=== PAUSE TestAccImageBuilderComponent_Platform_windows
=== RUN   TestAccImageBuilderComponent_supportedOsVersions
=== PAUSE TestAccImageBuilderComponent_supportedOsVersions
=== RUN   TestAccImageBuilderComponent_tags
=== PAUSE TestAccImageBuilderComponent_tags
=== RUN   TestAccImageBuilderComponent_uri
=== PAUSE TestAccImageBuilderComponent_uri
=== CONT  TestAccImageBuilderComponent_basic
=== CONT  TestAccImageBuilderComponent_Platform_windows
=== CONT  TestAccImageBuilderComponent_description
--- PASS: TestAccImageBuilderComponent_description (22.22s)
=== CONT  TestAccImageBuilderComponent_changeDescription
--- PASS: TestAccImageBuilderComponent_basic (22.45s)
=== CONT  TestAccImageBuilderComponent_tags
--- PASS: TestAccImageBuilderComponent_Platform_windows (22.73s)
=== CONT  TestAccImageBuilderComponent_uri
--- PASS: TestAccImageBuilderComponent_changeDescription (21.63s)
=== CONT  TestAccImageBuilderComponent_kmsKeyID
--- PASS: TestAccImageBuilderComponent_uri (27.35s)
=== CONT  TestAccImageBuilderComponent_disappears
--- PASS: TestAccImageBuilderComponent_disappears (16.93s)
=== CONT  TestAccImageBuilderComponent_supportedOsVersions
--- PASS: TestAccImageBuilderComponent_kmsKeyID (24.40s)
--- PASS: TestAccImageBuilderComponent_tags (48.74s)
--- PASS: TestAccImageBuilderComponent_supportedOsVersions (20.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder	93.448s

@ewbankkit
Copy link
Contributor

@kamilturek Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 711bbf6 into hashicorp:main Jan 17, 2023
@github-actions github-actions bot added this to the v4.51.0 milestone Jan 17, 2023
@github-actions
Copy link

This functionality has been released in v4.51.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

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 Feb 19, 2023
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/imagebuilder Issues and PRs that pertain to the imagebuilder 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.

aws_imagebuilder_component forcing replacement when data changes
2 participants