-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support/Document Debugger Processes #34
Comments
terraform-plugin-go v0.6.0 and a slightly refreshed mux API should make this relatively straightforward with something like: func main() {
debugFlag := flag.Bool("debug", false, "Start provider in debug mode.")
flag.Parse()
ctx := context.Background()
opts := []tf6server.ServeOpt{}
providers := []func() tfprotov6.ProviderServer{
/* providers */
}
if *debugFlag {
opts = append(opts, tf6server.WithManagedDebug())
}
muxedProvider, err := tf6muxserver.NewMuxServer(ctx, providers...)
if err != nil {
log.Fatal(err.Error())
}
tf6server.Serve("registry.terraform.io/namespace/example", muxedProvider.ProviderServer, opts...)
} |
Reference: #30 Reference: #34 Additional documentation for how to setup debugger support with muxed providers, which is based on the underlying terraform-plugin-go `tf5server` and `tf6server` implementations. This documentation is going into the README for now until a new https://terraform.io/plugin section is created for this project.
Reference: #30 Reference: #34 Additional documentation for how to setup debugger support with muxed providers, which is based on the underlying terraform-plugin-go `tf5server` and `tf6server` implementations. This documentation is going into the README for now until a new https://terraform.io/plugin section is created for this project.
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. |
terraform-plugin-mux version
Use cases
Similar to solely SDKv2 or framework based providers, developers may wish to easily run debugging and testing processes against a muxed provider. Currently, it would require a lot of manual
main
function setup to essentially reimplement what those two projects implement.Proposal
Natively support and/or document how to enable debugger functionality, similar to that which is available for SDKv2 and framework based providers. It may make more sense to implement a "DebugServe" method in terraform-plugin-go, rather than necessarily implement anything in this project.
References
The text was updated successfully, but these errors were encountered: