github.com/opentofu/opentofu@v1.7.1/internal/provisioner-local-exec/main/main.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package main 7 8 import ( 9 localexec "github.com/opentofu/opentofu/internal/builtin/provisioners/local-exec" 10 "github.com/opentofu/opentofu/internal/grpcwrap" 11 "github.com/opentofu/opentofu/internal/plugin" 12 "github.com/opentofu/opentofu/internal/tfplugin5" 13 ) 14 15 func main() { 16 // Provide a binary version of the internal terraform provider for testing 17 plugin.Serve(&plugin.ServeOpts{ 18 GRPCProvisionerFunc: func() tfplugin5.ProvisionerServer { 19 return grpcwrap.Provisioner(localexec.New()) 20 }, 21 }) 22 }