Package tf6muxserver combines multiple provider servers that implement protocol version 6, into a single server.
Supported protocol version 6 provider servers include any which implement the tfprotov6.ProviderServer (https://pkg.go.dev/github.com/hashicorp/terraform-plugin-go/tfprotov6#ProviderServer) interface, such as:
Refer to the NewMuxServer() function for creating a combined server.
This section is empty.
This section is empty.
NewMuxServer returns a muxed server that will route gRPC requests between tfprotov6.ProviderServers specified. When the GetProviderSchema RPC of each is called, there is verification that the overall muxed server is compatible by ensuring:
package main import ( "context" "log" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server" "github.com/hashicorp/terraform-plugin-mux/tf6muxserver" ) func main() { ctx := context.Background() providers := []func() tfprotov6.ProviderServer{ // Example terraform-plugin-framework ProviderServer function // func() tfprotov6.ProviderServer { // return tfsdk.NewProtocol6Server(frameworkprovider.New("version")()) // }, // // Example terraform-plugin-go ProviderServer function // goprovider.Provider(), } // requests will be routed to whichever server advertises support for // them in the GetSchema response. Only one server may advertise // support for any given resource, data source, or the provider or // provider_meta schemas. An error will be returned if more than one // server claims support. muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...) if err != nil { log.Fatalln(err.Error()) } // Use the result to start a muxed provider err = tf6server.Serve("registry.terraform.io/namespace/example", muxServer.ProviderServer) if err != nil { log.Fatalln(err.Error()) } }
This section is empty.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4