You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Downstream abstractions, such as terraform-plugin-sdk/v2 and terraform-plugin-framework, make it relatively straightforward to run servers that invert the process lifecycle so they can be instrumented by debugger and testing processes. Providers written directly on terraform-plugin-go or reliant on terraform-plugin-mux essentially must reimplement those projects' logic to do the same. Given that the reattach handling is strongly correlated to low level details about go-plugin and Terraform CLI, it feels like a potential candidate for creating an implementation in this project.
Proposal
Adding DebugServe and/or Debug functionality in tf5server/tf6server, similar to downstream implementations. Document in README (until #129 is sorted).
Reference: #134
This will allow providers and downstream SDK implementations to opt into a fully managed debug server, which manages reattach configuration handling and stop signals, rather than requiring duplicate logic that can be unclear to implement.
The `tf5server` and `tf6server` implementations could use some refactoring to reduce _their_ duplicated code (e.g. a shared internal package), however that is left for future handling, especially with other in flight changes at the moment.
Reference: #134
This will allow providers and downstream SDK implementations to opt into a fully managed debug server, which manages reattach configuration handling and stop signals, rather than requiring duplicate logic that can be unclear to implement.
The `tf5server` and `tf6server` implementations could use some refactoring to reduce _their_ duplicated code (e.g. a shared internal package), however that is left for future handling, especially with other in flight changes at the moment.
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
terraform-plugin-go version
Use cases
Downstream abstractions, such as terraform-plugin-sdk/v2 and terraform-plugin-framework, make it relatively straightforward to run servers that invert the process lifecycle so they can be instrumented by debugger and testing processes. Providers written directly on terraform-plugin-go or reliant on terraform-plugin-mux essentially must reimplement those projects' logic to do the same. Given that the reattach handling is strongly correlated to low level details about go-plugin and Terraform CLI, it feels like a potential candidate for creating an implementation in this project.
Proposal
Adding
DebugServe
and/orDebug
functionality in tf5server/tf6server, similar to downstream implementations. Document in README (until #129 is sorted).References
The text was updated successfully, but these errors were encountered: