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

Add skip_destroy to ImageBuilder Container/Image Recipes #30531

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

amancevice
Copy link
Contributor

@amancevice amancevice commented Apr 7, 2023

Description

Adds the optional skip_destroy argument to aws_imagebuilder_container_recipe and aws_imagebuilder_image_recipe resources.

This replicates the behavior for the aws_imagebuilder_component resource, which is versioned in AWS the same way as the recipes.

Relations

N/A

References

Output from Acceptance Testing

$ make testacc TESTS='TestAccImageBuilderContainerRecipe_' PKG=imagebuilder

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/imagebuilder/... -v -count 1 -parallel 20 -run='TestAccImageBuilderContainerRecipe_'  -timeout 180m
=== RUN   TestAccImageBuilderContainerRecipe_basic
=== PAUSE TestAccImageBuilderContainerRecipe_basic
=== RUN   TestAccImageBuilderContainerRecipe_disappears
=== PAUSE TestAccImageBuilderContainerRecipe_disappears
=== RUN   TestAccImageBuilderContainerRecipe_component
=== PAUSE TestAccImageBuilderContainerRecipe_component
=== RUN   TestAccImageBuilderContainerRecipe_componentParameter
=== PAUSE TestAccImageBuilderContainerRecipe_componentParameter
=== RUN   TestAccImageBuilderContainerRecipe_description
=== PAUSE TestAccImageBuilderContainerRecipe_description
=== RUN   TestAccImageBuilderContainerRecipe_dockerfileTemplateURI
=== PAUSE TestAccImageBuilderContainerRecipe_dockerfileTemplateURI
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_deviceName
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_deviceName
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_deleteOnTermination
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_deleteOnTermination
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_encrypted
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_encrypted
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_iops
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_iops
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_kmsKeyID
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_kmsKeyID
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_snapshotID
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_snapshotID
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_throughput
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_throughput
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeSize
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeSize
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeType
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeType
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_noDevice
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_noDevice
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_virtualName
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_virtualName
=== RUN   TestAccImageBuilderContainerRecipe_InstanceConfiguration_Image
=== PAUSE TestAccImageBuilderContainerRecipe_InstanceConfiguration_Image
=== RUN   TestAccImageBuilderContainerRecipe_kmsKeyID
=== PAUSE TestAccImageBuilderContainerRecipe_kmsKeyID
=== RUN   TestAccImageBuilderContainerRecipe_tags
=== PAUSE TestAccImageBuilderContainerRecipe_tags
=== RUN   TestAccImageBuilderContainerRecipe_workingDirectory
=== PAUSE TestAccImageBuilderContainerRecipe_workingDirectory
=== RUN   TestAccImageBuilderContainerRecipe_platformOverride
=== PAUSE TestAccImageBuilderContainerRecipe_platformOverride
=== CONT  TestAccImageBuilderContainerRecipe_basic
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_snapshotID
=== CONT  TestAccImageBuilderContainerRecipe_kmsKeyID
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_noDevice
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeSize
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_throughput
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_kmsKeyID
=== CONT  TestAccImageBuilderContainerRecipe_dockerfileTemplateURI
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_Image
=== CONT  TestAccImageBuilderContainerRecipe_platformOverride
=== CONT  TestAccImageBuilderContainerRecipe_workingDirectory
=== CONT  TestAccImageBuilderContainerRecipe_tags
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeType
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_virtualName
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_deviceName
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_encrypted
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_deleteOnTermination
=== CONT  TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_iops
=== CONT  TestAccImageBuilderContainerRecipe_component
=== CONT  TestAccImageBuilderContainerRecipe_componentParameter
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_virtualName (49.63s)
=== CONT  TestAccImageBuilderContainerRecipe_description
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_iops (49.71s)
=== CONT  TestAccImageBuilderContainerRecipe_disappears
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_encrypted (50.51s)
--- PASS: TestAccImageBuilderContainerRecipe_kmsKeyID (51.66s)
--- PASS: TestAccImageBuilderContainerRecipe_platformOverride (51.73s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_kmsKeyID (52.09s)
--- PASS: TestAccImageBuilderContainerRecipe_workingDirectory (52.24s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeSize (53.46s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_deviceName (53.67s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_volumeType (53.75s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_deleteOnTermination (54.69s)
--- PASS: TestAccImageBuilderContainerRecipe_basic (55.04s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMapping_noDevice (55.22s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_throughput (60.28s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_Image (60.81s)
--- PASS: TestAccImageBuilderContainerRecipe_dockerfileTemplateURI (60.86s)
--- PASS: TestAccImageBuilderContainerRecipe_component (64.96s)
--- PASS: TestAccImageBuilderContainerRecipe_componentParameter (67.05s)
--- PASS: TestAccImageBuilderContainerRecipe_disappears (22.33s)
--- PASS: TestAccImageBuilderContainerRecipe_description (25.81s)
--- PASS: TestAccImageBuilderContainerRecipe_InstanceConfiguration_BlockDeviceMappingEBS_snapshotID (76.17s)
--- PASS: TestAccImageBuilderContainerRecipe_tags (85.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder	88.007s

$ make testacc TESTS='TestAccImageBuilderImageRecipe_' PKG=imagebuilder

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/imagebuilder/... -v -count 1 -parallel 20 -run='TestAccImageBuilderImageRecipe_'  -timeout 180m
=== RUN   TestAccImageBuilderImageRecipe_basic
=== PAUSE TestAccImageBuilderImageRecipe_basic
=== RUN   TestAccImageBuilderImageRecipe_disappears
=== PAUSE TestAccImageBuilderImageRecipe_disappears
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMapping_deviceName
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMapping_deviceName
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_deleteOnTermination
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_deleteOnTermination
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_encrypted
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_encrypted
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_iops
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_iops
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_kmsKeyID
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_kmsKeyID
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_snapshotID
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_snapshotID
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_throughput
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_throughput
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeSize
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeSize
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP2
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP2
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP3
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP3
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMapping_noDevice
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMapping_noDevice
=== RUN   TestAccImageBuilderImageRecipe_BlockDeviceMapping_virtualName
=== PAUSE TestAccImageBuilderImageRecipe_BlockDeviceMapping_virtualName
=== RUN   TestAccImageBuilderImageRecipe_component
=== PAUSE TestAccImageBuilderImageRecipe_component
=== RUN   TestAccImageBuilderImageRecipe_componentParameter
=== PAUSE TestAccImageBuilderImageRecipe_componentParameter
=== RUN   TestAccImageBuilderImageRecipe_description
=== PAUSE TestAccImageBuilderImageRecipe_description
=== RUN   TestAccImageBuilderImageRecipe_tags
=== PAUSE TestAccImageBuilderImageRecipe_tags
=== RUN   TestAccImageBuilderImageRecipe_workingDirectory
=== PAUSE TestAccImageBuilderImageRecipe_workingDirectory
=== RUN   TestAccImageBuilderImageRecipe_pipelineUpdateDependency
=== PAUSE TestAccImageBuilderImageRecipe_pipelineUpdateDependency
=== RUN   TestAccImageBuilderImageRecipe_systemsManagerAgent
=== PAUSE TestAccImageBuilderImageRecipe_systemsManagerAgent
=== RUN   TestAccImageBuilderImageRecipe_updateDependency
=== PAUSE TestAccImageBuilderImageRecipe_updateDependency
=== RUN   TestAccImageBuilderImageRecipe_userDataBase64
=== PAUSE TestAccImageBuilderImageRecipe_userDataBase64
=== RUN   TestAccImageBuilderImageRecipe_windowsBaseImage
=== PAUSE TestAccImageBuilderImageRecipe_windowsBaseImage
=== CONT  TestAccImageBuilderImageRecipe_basic
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMapping_noDevice
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_kmsKeyID
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP3
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_encrypted
=== CONT  TestAccImageBuilderImageRecipe_pipelineUpdateDependency
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeSize
=== CONT  TestAccImageBuilderImageRecipe_componentParameter
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_snapshotID
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP2
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_deleteOnTermination
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_iops
=== CONT  TestAccImageBuilderImageRecipe_workingDirectory
=== CONT  TestAccImageBuilderImageRecipe_windowsBaseImage
=== CONT  TestAccImageBuilderImageRecipe_userDataBase64
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_throughput
=== CONT  TestAccImageBuilderImageRecipe_systemsManagerAgent
=== CONT  TestAccImageBuilderImageRecipe_updateDependency
=== CONT  TestAccImageBuilderImageRecipe_tags
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMapping_deviceName
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_deleteOnTermination (44.19s)
=== CONT  TestAccImageBuilderImageRecipe_component
--- PASS: TestAccImageBuilderImageRecipe_systemsManagerAgent (46.41s)
=== CONT  TestAccImageBuilderImageRecipe_BlockDeviceMapping_virtualName
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_kmsKeyID (46.62s)
=== CONT  TestAccImageBuilderImageRecipe_description
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP2 (46.66s)
=== CONT  TestAccImageBuilderImageRecipe_disappears
--- PASS: TestAccImageBuilderImageRecipe_componentParameter (46.71s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_encrypted (46.89s)
--- PASS: TestAccImageBuilderImageRecipe_workingDirectory (47.22s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMapping_deviceName (47.28s)
--- PASS: TestAccImageBuilderImageRecipe_windowsBaseImage (47.35s)
--- PASS: TestAccImageBuilderImageRecipe_userDataBase64 (47.87s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeTypeGP3 (51.63s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_volumeSize (52.51s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_throughput (52.72s)
--- PASS: TestAccImageBuilderImageRecipe_basic (55.61s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_iops (59.49s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMapping_noDevice (59.77s)
--- PASS: TestAccImageBuilderImageRecipe_disappears (26.89s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMapping_virtualName (29.95s)
--- PASS: TestAccImageBuilderImageRecipe_description (30.17s)
--- PASS: TestAccImageBuilderImageRecipe_BlockDeviceMappingEBS_snapshotID (77.70s)
--- PASS: TestAccImageBuilderImageRecipe_component (34.17s)
--- PASS: TestAccImageBuilderImageRecipe_updateDependency (79.60s)
--- PASS: TestAccImageBuilderImageRecipe_pipelineUpdateDependency (80.27s)
--- PASS: TestAccImageBuilderImageRecipe_tags (98.97s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/imagebuilder	101.835s

@github-actions
Copy link

github-actions bot commented Apr 7, 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 documentation Introduces or discusses updates to documentation. service/imagebuilder Issues and PRs that pertain to the imagebuilder service. size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Apr 7, 2023
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Apr 7, 2023
@amancevice amancevice force-pushed the f-aws_imagebuilder_x_recipe-skip_destroy branch from 7ec330b to 1368906 Compare April 7, 2023 13:53
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/S Managed by automation to categorize the size of a PR. labels Apr 7, 2023
@amancevice amancevice marked this pull request as ready for review April 7, 2023 14:01
@amancevice amancevice force-pushed the f-aws_imagebuilder_x_recipe-skip_destroy branch from 1368906 to b6cf866 Compare April 9, 2023 21:42
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 11, 2023
@amancevice amancevice force-pushed the f-aws_imagebuilder_x_recipe-skip_destroy branch from b6cf866 to e228863 Compare April 12, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

2 participants