Documentation ¶
Index ¶
- Constants
- Variables
- func Serve(opts *ServeOpts)
- type ProviderFunc
- type ProvisionerFunc
- type ResourceProvider
- func (p *ResourceProvider) Apply(info *terraform.InstanceInfo, s *terraform.InstanceState, ...) (*terraform.InstanceState, error)
- func (p *ResourceProvider) Close() error
- func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error
- func (p *ResourceProvider) DataSources() []terraform.DataSource
- func (p *ResourceProvider) Diff(info *terraform.InstanceInfo, s *terraform.InstanceState, ...) (*terraform.InstanceDiff, error)
- func (p *ResourceProvider) ImportState(info *terraform.InstanceInfo, id string) ([]*terraform.InstanceState, error)
- func (p *ResourceProvider) Input(input terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
- func (p *ResourceProvider) ReadDataApply(info *terraform.InstanceInfo, d *terraform.InstanceDiff) (*terraform.InstanceState, error)
- func (p *ResourceProvider) ReadDataDiff(info *terraform.InstanceInfo, c *terraform.ResourceConfig) (*terraform.InstanceDiff, error)
- func (p *ResourceProvider) Refresh(info *terraform.InstanceInfo, s *terraform.InstanceState) (*terraform.InstanceState, error)
- func (p *ResourceProvider) Resources() []terraform.ResourceType
- func (p *ResourceProvider) Stop() error
- func (p *ResourceProvider) Validate(c *terraform.ResourceConfig) ([]string, []error)
- func (p *ResourceProvider) ValidateDataSource(t string, c *terraform.ResourceConfig) ([]string, []error)
- func (p *ResourceProvider) ValidateResource(t string, c *terraform.ResourceConfig) ([]string, []error)
- type ResourceProviderApplyArgs
- type ResourceProviderApplyResponse
- type ResourceProviderConfigureResponse
- type ResourceProviderDiffArgs
- type ResourceProviderDiffResponse
- type ResourceProviderImportStateArgs
- type ResourceProviderImportStateResponse
- type ResourceProviderInputArgs
- type ResourceProviderInputResponse
- type ResourceProviderPlugin
- type ResourceProviderReadDataApplyArgs
- type ResourceProviderReadDataApplyResponse
- type ResourceProviderReadDataDiffArgs
- type ResourceProviderReadDataDiffResponse
- type ResourceProviderRefreshArgs
- type ResourceProviderRefreshResponse
- type ResourceProviderServer
- func (s *ResourceProviderServer) Apply(args *ResourceProviderApplyArgs, result *ResourceProviderApplyResponse) error
- func (s *ResourceProviderServer) Configure(config *terraform.ResourceConfig, reply *ResourceProviderConfigureResponse) error
- func (s *ResourceProviderServer) DataSources(nothing interface{}, result *[]terraform.DataSource) error
- func (s *ResourceProviderServer) Diff(args *ResourceProviderDiffArgs, result *ResourceProviderDiffResponse) error
- func (s *ResourceProviderServer) ImportState(args *ResourceProviderImportStateArgs, ...) error
- func (s *ResourceProviderServer) Input(args *ResourceProviderInputArgs, reply *ResourceProviderInputResponse) error
- func (s *ResourceProviderServer) ReadDataApply(args *ResourceProviderReadDataApplyArgs, ...) error
- func (s *ResourceProviderServer) ReadDataDiff(args *ResourceProviderReadDataDiffArgs, ...) error
- func (s *ResourceProviderServer) Refresh(args *ResourceProviderRefreshArgs, result *ResourceProviderRefreshResponse) error
- func (s *ResourceProviderServer) Resources(nothing interface{}, result *[]terraform.ResourceType) error
- func (s *ResourceProviderServer) Stop(_ interface{}, reply *ResourceProviderStopResponse) error
- func (s *ResourceProviderServer) Validate(args *ResourceProviderValidateArgs, reply *ResourceProviderValidateResponse) error
- func (s *ResourceProviderServer) ValidateDataSource(args *ResourceProviderValidateResourceArgs, ...) error
- func (s *ResourceProviderServer) ValidateResource(args *ResourceProviderValidateResourceArgs, ...) error
- type ResourceProviderStopResponse
- type ResourceProviderValidateArgs
- type ResourceProviderValidateResourceArgs
- type ResourceProviderValidateResourceResponse
- type ResourceProviderValidateResponse
- type ResourceProvisioner
- type ResourceProvisionerApplyArgs
- type ResourceProvisionerApplyResponse
- type ResourceProvisionerPlugin
- type ResourceProvisionerServer
- type ResourceProvisionerValidateArgs
- type ResourceProvisionerValidateResponse
- type ServeOpts
- type UIInput
- type UIInputInputResponse
- type UIInputServer
- type UIOutput
- type UIOutputServer
Constants ¶
const ( ProviderPluginName = "provider" ProvisionerPluginName = "provisioner" )
The constants below are the names of the plugins that can be dispensed from the plugin server.
Variables ¶
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "TF_PLUGIN_MAGIC_COOKIE",
MagicCookieValue: "d602bf8f470bc67ca7faa0386276bbdd4330efaf76d1a219cb4d6991ca9872b2",
}
Handshake is the HandshakeConfig used to configure clients and servers.
var PluginMap = map[string]plugin.Plugin{ "provider": &ResourceProviderPlugin{}, "provisioner": &ResourceProvisionerPlugin{}, }
PluginMap should be used by clients for the map of plugins.
Functions ¶
Types ¶
type ProviderFunc ¶ added in v0.7.0
type ProviderFunc func() terraform.ResourceProvider
type ProvisionerFunc ¶ added in v0.7.0
type ProvisionerFunc func() terraform.ResourceProvisioner
type ResourceProvider ¶ added in v0.7.0
ResourceProvider is an implementation of terraform.ResourceProvider that communicates over RPC.
func (*ResourceProvider) Apply ¶ added in v0.7.0
func (p *ResourceProvider) Apply( info *terraform.InstanceInfo, s *terraform.InstanceState, d *terraform.InstanceDiff) (*terraform.InstanceState, error)
func (*ResourceProvider) Close ¶ added in v0.7.0
func (p *ResourceProvider) Close() error
func (*ResourceProvider) Configure ¶ added in v0.7.0
func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error
func (*ResourceProvider) DataSources ¶ added in v0.7.0
func (p *ResourceProvider) DataSources() []terraform.DataSource
func (*ResourceProvider) Diff ¶ added in v0.7.0
func (p *ResourceProvider) Diff( info *terraform.InstanceInfo, s *terraform.InstanceState, c *terraform.ResourceConfig) (*terraform.InstanceDiff, error)
func (*ResourceProvider) ImportState ¶ added in v0.7.0
func (p *ResourceProvider) ImportState( info *terraform.InstanceInfo, id string) ([]*terraform.InstanceState, error)
func (*ResourceProvider) Input ¶ added in v0.7.0
func (p *ResourceProvider) Input( input terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
func (*ResourceProvider) ReadDataApply ¶ added in v0.7.0
func (p *ResourceProvider) ReadDataApply( info *terraform.InstanceInfo, d *terraform.InstanceDiff) (*terraform.InstanceState, error)
func (*ResourceProvider) ReadDataDiff ¶ added in v0.7.0
func (p *ResourceProvider) ReadDataDiff( info *terraform.InstanceInfo, c *terraform.ResourceConfig) (*terraform.InstanceDiff, error)
func (*ResourceProvider) Refresh ¶ added in v0.7.0
func (p *ResourceProvider) Refresh( info *terraform.InstanceInfo, s *terraform.InstanceState) (*terraform.InstanceState, error)
func (*ResourceProvider) Resources ¶ added in v0.7.0
func (p *ResourceProvider) Resources() []terraform.ResourceType
func (*ResourceProvider) Stop ¶ added in v0.8.0
func (p *ResourceProvider) Stop() error
func (*ResourceProvider) Validate ¶ added in v0.7.0
func (p *ResourceProvider) Validate(c *terraform.ResourceConfig) ([]string, []error)
func (*ResourceProvider) ValidateDataSource ¶ added in v0.7.0
func (p *ResourceProvider) ValidateDataSource( t string, c *terraform.ResourceConfig) ([]string, []error)
func (*ResourceProvider) ValidateResource ¶ added in v0.7.0
func (p *ResourceProvider) ValidateResource( t string, c *terraform.ResourceConfig) ([]string, []error)
type ResourceProviderApplyArgs ¶ added in v0.7.0
type ResourceProviderApplyArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState Diff *terraform.InstanceDiff }
type ResourceProviderApplyResponse ¶ added in v0.7.0
type ResourceProviderApplyResponse struct { State *terraform.InstanceState Error *plugin.BasicError }
type ResourceProviderConfigureResponse ¶ added in v0.7.0
type ResourceProviderConfigureResponse struct {
Error *plugin.BasicError
}
type ResourceProviderDiffArgs ¶ added in v0.7.0
type ResourceProviderDiffArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState Config *terraform.ResourceConfig }
type ResourceProviderDiffResponse ¶ added in v0.7.0
type ResourceProviderDiffResponse struct { Diff *terraform.InstanceDiff Error *plugin.BasicError }
type ResourceProviderImportStateArgs ¶ added in v0.7.0
type ResourceProviderImportStateArgs struct { Info *terraform.InstanceInfo Id string }
type ResourceProviderImportStateResponse ¶ added in v0.7.0
type ResourceProviderImportStateResponse struct { State []*terraform.InstanceState Error *plugin.BasicError }
type ResourceProviderInputArgs ¶ added in v0.7.0
type ResourceProviderInputArgs struct { InputId uint32 Config *terraform.ResourceConfig }
type ResourceProviderInputResponse ¶ added in v0.7.0
type ResourceProviderInputResponse struct { Config *terraform.ResourceConfig Error *plugin.BasicError }
type ResourceProviderPlugin ¶ added in v0.7.0
type ResourceProviderPlugin struct {
F func() terraform.ResourceProvider
}
ResourceProviderPlugin is the plugin.Plugin implementation.
func (*ResourceProviderPlugin) Client ¶ added in v0.7.0
func (p *ResourceProviderPlugin) Client( b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*ResourceProviderPlugin) Server ¶ added in v0.7.0
func (p *ResourceProviderPlugin) Server(b *plugin.MuxBroker) (interface{}, error)
type ResourceProviderReadDataApplyArgs ¶ added in v0.7.0
type ResourceProviderReadDataApplyArgs struct { Info *terraform.InstanceInfo Diff *terraform.InstanceDiff }
type ResourceProviderReadDataApplyResponse ¶ added in v0.7.0
type ResourceProviderReadDataApplyResponse struct { State *terraform.InstanceState Error *plugin.BasicError }
type ResourceProviderReadDataDiffArgs ¶ added in v0.7.0
type ResourceProviderReadDataDiffArgs struct { Info *terraform.InstanceInfo Config *terraform.ResourceConfig }
type ResourceProviderReadDataDiffResponse ¶ added in v0.7.0
type ResourceProviderReadDataDiffResponse struct { Diff *terraform.InstanceDiff Error *plugin.BasicError }
type ResourceProviderRefreshArgs ¶ added in v0.7.0
type ResourceProviderRefreshArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState }
type ResourceProviderRefreshResponse ¶ added in v0.7.0
type ResourceProviderRefreshResponse struct { State *terraform.InstanceState Error *plugin.BasicError }
type ResourceProviderServer ¶ added in v0.7.0
type ResourceProviderServer struct { Broker *plugin.MuxBroker Provider terraform.ResourceProvider }
ResourceProviderServer is a net/rpc compatible structure for serving a ResourceProvider. This should not be used directly.
func (*ResourceProviderServer) Apply ¶ added in v0.7.0
func (s *ResourceProviderServer) Apply( args *ResourceProviderApplyArgs, result *ResourceProviderApplyResponse) error
func (*ResourceProviderServer) Configure ¶ added in v0.7.0
func (s *ResourceProviderServer) Configure( config *terraform.ResourceConfig, reply *ResourceProviderConfigureResponse) error
func (*ResourceProviderServer) DataSources ¶ added in v0.7.0
func (s *ResourceProviderServer) DataSources( nothing interface{}, result *[]terraform.DataSource) error
func (*ResourceProviderServer) Diff ¶ added in v0.7.0
func (s *ResourceProviderServer) Diff( args *ResourceProviderDiffArgs, result *ResourceProviderDiffResponse) error
func (*ResourceProviderServer) ImportState ¶ added in v0.7.0
func (s *ResourceProviderServer) ImportState( args *ResourceProviderImportStateArgs, result *ResourceProviderImportStateResponse) error
func (*ResourceProviderServer) Input ¶ added in v0.7.0
func (s *ResourceProviderServer) Input( args *ResourceProviderInputArgs, reply *ResourceProviderInputResponse) error
func (*ResourceProviderServer) ReadDataApply ¶ added in v0.7.0
func (s *ResourceProviderServer) ReadDataApply( args *ResourceProviderReadDataApplyArgs, result *ResourceProviderReadDataApplyResponse) error
func (*ResourceProviderServer) ReadDataDiff ¶ added in v0.7.0
func (s *ResourceProviderServer) ReadDataDiff( args *ResourceProviderReadDataDiffArgs, result *ResourceProviderReadDataDiffResponse) error
func (*ResourceProviderServer) Refresh ¶ added in v0.7.0
func (s *ResourceProviderServer) Refresh( args *ResourceProviderRefreshArgs, result *ResourceProviderRefreshResponse) error
func (*ResourceProviderServer) Resources ¶ added in v0.7.0
func (s *ResourceProviderServer) Resources( nothing interface{}, result *[]terraform.ResourceType) error
func (*ResourceProviderServer) Stop ¶ added in v0.8.0
func (s *ResourceProviderServer) Stop( _ interface{}, reply *ResourceProviderStopResponse) error
func (*ResourceProviderServer) Validate ¶ added in v0.7.0
func (s *ResourceProviderServer) Validate( args *ResourceProviderValidateArgs, reply *ResourceProviderValidateResponse) error
func (*ResourceProviderServer) ValidateDataSource ¶ added in v0.7.0
func (s *ResourceProviderServer) ValidateDataSource( args *ResourceProviderValidateResourceArgs, reply *ResourceProviderValidateResourceResponse) error
func (*ResourceProviderServer) ValidateResource ¶ added in v0.7.0
func (s *ResourceProviderServer) ValidateResource( args *ResourceProviderValidateResourceArgs, reply *ResourceProviderValidateResourceResponse) error
type ResourceProviderStopResponse ¶ added in v0.8.0
type ResourceProviderStopResponse struct {
Error *plugin.BasicError
}
type ResourceProviderValidateArgs ¶ added in v0.7.0
type ResourceProviderValidateArgs struct {
Config *terraform.ResourceConfig
}
type ResourceProviderValidateResourceArgs ¶ added in v0.7.0
type ResourceProviderValidateResourceArgs struct { Config *terraform.ResourceConfig Type string }
type ResourceProviderValidateResourceResponse ¶ added in v0.7.0
type ResourceProviderValidateResourceResponse struct { Warnings []string Errors []*plugin.BasicError }
type ResourceProviderValidateResponse ¶ added in v0.7.0
type ResourceProviderValidateResponse struct { Warnings []string Errors []*plugin.BasicError }
type ResourceProvisioner ¶ added in v0.7.0
ResourceProvisioner is an implementation of terraform.ResourceProvisioner that communicates over RPC.
func (*ResourceProvisioner) Apply ¶ added in v0.7.0
func (p *ResourceProvisioner) Apply( output terraform.UIOutput, s *terraform.InstanceState, c *terraform.ResourceConfig) error
func (*ResourceProvisioner) Close ¶ added in v0.7.0
func (p *ResourceProvisioner) Close() error
func (*ResourceProvisioner) Validate ¶ added in v0.7.0
func (p *ResourceProvisioner) Validate(c *terraform.ResourceConfig) ([]string, []error)
type ResourceProvisionerApplyArgs ¶ added in v0.7.0
type ResourceProvisionerApplyArgs struct { OutputId uint32 State *terraform.InstanceState Config *terraform.ResourceConfig }
type ResourceProvisionerApplyResponse ¶ added in v0.7.0
type ResourceProvisionerApplyResponse struct {
Error *plugin.BasicError
}
type ResourceProvisionerPlugin ¶ added in v0.7.0
type ResourceProvisionerPlugin struct {
F func() terraform.ResourceProvisioner
}
ResourceProvisionerPlugin is the plugin.Plugin implementation.
func (*ResourceProvisionerPlugin) Client ¶ added in v0.7.0
func (p *ResourceProvisionerPlugin) Client( b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*ResourceProvisionerPlugin) Server ¶ added in v0.7.0
func (p *ResourceProvisionerPlugin) Server(b *plugin.MuxBroker) (interface{}, error)
type ResourceProvisionerServer ¶ added in v0.7.0
type ResourceProvisionerServer struct { Broker *plugin.MuxBroker Provisioner terraform.ResourceProvisioner }
ResourceProvisionerServer is a net/rpc compatible structure for serving a ResourceProvisioner. This should not be used directly.
func (*ResourceProvisionerServer) Apply ¶ added in v0.7.0
func (s *ResourceProvisionerServer) Apply( args *ResourceProvisionerApplyArgs, result *ResourceProvisionerApplyResponse) error
func (*ResourceProvisionerServer) Validate ¶ added in v0.7.0
func (s *ResourceProvisionerServer) Validate( args *ResourceProvisionerValidateArgs, reply *ResourceProvisionerValidateResponse) error
type ResourceProvisionerValidateArgs ¶ added in v0.7.0
type ResourceProvisionerValidateArgs struct {
Config *terraform.ResourceConfig
}
type ResourceProvisionerValidateResponse ¶ added in v0.7.0
type ResourceProvisionerValidateResponse struct { Warnings []string Errors []*plugin.BasicError }
type ServeOpts ¶ added in v0.3.0
type ServeOpts struct { ProviderFunc ProviderFunc ProvisionerFunc ProvisionerFunc }
ServeOpts are the configurations to serve a plugin.
type UIInput ¶ added in v0.7.0
UIInput is an implementatin of terraform.UIInput that communicates over RPC.
type UIInputInputResponse ¶ added in v0.7.0
type UIInputInputResponse struct { Value string Error *plugin.BasicError }
type UIInputServer ¶ added in v0.7.0
UIInputServer is a net/rpc compatible structure for serving a UIInputServer. This should not be used directly.
func (*UIInputServer) Input ¶ added in v0.7.0
func (s *UIInputServer) Input( opts *terraform.InputOpts, reply *UIInputInputResponse) error
type UIOutput ¶ added in v0.7.0
UIOutput is an implementatin of terraform.UIOutput that communicates over RPC.
type UIOutputServer ¶ added in v0.7.0
UIOutputServer is the RPC server for serving UIOutput.
func (*UIOutputServer) Output ¶ added in v0.7.0
func (s *UIOutputServer) Output( v string, reply *interface{}) error