mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 11:42:58 -06:00
76cb40005a
Rename grpcwrap.New() to grpcwrap.Provider() Add a grpcwrap function to create a test proivisioner plugin.
18 lines
475 B
Go
18 lines
475 B
Go
package main
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/builtin/providers/terraform"
|
|
"github.com/hashicorp/terraform/internal/grpcwrap"
|
|
"github.com/hashicorp/terraform/internal/tfplugin5"
|
|
"github.com/hashicorp/terraform/plugin"
|
|
)
|
|
|
|
func main() {
|
|
// Provide a binary version of the internal terraform provider for testing
|
|
plugin.Serve(&plugin.ServeOpts{
|
|
GRPCProviderFunc: func() tfplugin5.ProviderServer {
|
|
return grpcwrap.Provider(terraform.NewProvider())
|
|
},
|
|
})
|
|
}
|