hashicorp / hashicorp/packer-plugin-amazon
EBS source instance termination wait can dominate cleanup
- Dominant language
- Go
- Stars
- 91
- Forks
- 141
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
### Overview
I think some Amazon EBS workflows could benefit from an explicit option to return after EC2 accepts source instance termination.
The case I measured used Packer to run work on a source instance and collect outputs before cleanup. The build did not need Packer to wait for the instance to reach the final `terminated` state.
### Measurements
In a direct EC2 lifecycle comparison, `c5.large` reached `terminated` in about one minute after `TerminateInstances` was accepted. `c5.metal` remained `shutting-down` for more than 19 minutes before later reaching `terminated`.
In a minimal local Packer run on `c5.metal`, EC2 accepted source instance termination around one second after Packer requested it. Waiting for the final state was the long part.
### Expected behavior
My theory is that the current default wait should stay unchanged. A separate opt in setting would let callers choose the faster completion point when their workflow does not need Packer to wait for final source instance deletion.
### Scope
This is separate from `skip_create_ami`. The option should not require image creation to be disabled. It is about the cleanup completion point after EC2 accepts source instance termination.
Contributor guide
Assessment
This issue has not been assessed yet.