tfexec: add InterruptChannel option to allow a user triggered interrupt
This is an alternative to #332, adding an option that enables the user to implement graceful shutdowns for Apply and Destroy operations.
Rather than adding an option that changes the behavior of the input context, we instead add an option that specifically sends an interrupt to the terraform process. The input context behavior remains unchanged.
This requires the caller to do a bit more orchestration work for timeouts, but keeps context truer to the "abandon work" intent. This also allows users to force quit even if they are in the middle of a graceful shutdown, rathern than having one behavior mutually exclusive with the other.
Refs
- https://github.com/hashicorp/terraform-plugin-sdk/issues/141
- https://github.com/hashicorp/terraform-provider-aws/issues/4177
- https://github.com/hashicorp/terraform-provider-aws/issues/15090
is there any update about this feature request and this PR? cheers