mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-22 12:02:11 -04:00
The context used for Stop is more appropriately tied to the lifetime of the provisioner rather than a call to the ProvisionResource method. In some cases Stop can be called before ProvisionResource, causing a panic the provisioner. Rather than adding nil checks to the CancelFunc call for Stop, create a base context to use for cancellation with both Stop and Close methods.