github.com/opentofu/opentofu@v1.7.1/internal/plugin/plugin.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 plugin
     7  
     8  import (
     9  	"github.com/hashicorp/go-plugin"
    10  	"github.com/opentofu/opentofu/internal/plugin6"
    11  )
    12  
    13  // VersionedPlugins includes both protocol 5 and 6 because this is the function
    14  // called in providerFactory (command/meta_providers.go) to set up the initial
    15  // plugin client config.
    16  var VersionedPlugins = map[int]plugin.PluginSet{
    17  	5: {
    18  		"provider":    &GRPCProviderPlugin{},
    19  		"provisioner": &GRPCProvisionerPlugin{},
    20  	},
    21  	6: {
    22  		"provider": &plugin6.GRPCProviderPlugin{},
    23  	},
    24  }