Documentation ¶
Overview ¶
A Pulumi resource provider for running commands
Index ¶
- func PkgVersion() (semver.Version, error)
- type Cmd
- type CmdArgs
- type CmdInput
- type CmdOutput
- func (o CmdOutput) Command() pulumi.StringArrayOutput
- func (CmdOutput) ElementType() reflect.Type
- func (o CmdOutput) Environment() pulumi.StringMapOutput
- func (o CmdOutput) Stdin() pulumi.StringPtrOutput
- func (o CmdOutput) ToCmdOutput() CmdOutput
- func (o CmdOutput) ToCmdOutputWithContext(ctx context.Context) CmdOutput
- func (o CmdOutput) ToCmdPtrOutput() CmdPtrOutput
- func (o CmdOutput) ToCmdPtrOutputWithContext(ctx context.Context) CmdPtrOutput
- type CmdPtrInput
- type CmdPtrOutput
- func (o CmdPtrOutput) Command() pulumi.StringArrayOutput
- func (o CmdPtrOutput) Elem() CmdOutput
- func (CmdPtrOutput) ElementType() reflect.Type
- func (o CmdPtrOutput) Environment() pulumi.StringMapOutput
- func (o CmdPtrOutput) Stdin() pulumi.StringPtrOutput
- func (o CmdPtrOutput) ToCmdPtrOutput() CmdPtrOutput
- func (o CmdPtrOutput) ToCmdPtrOutputWithContext(ctx context.Context) CmdPtrOutput
- type Command
- type CommandArgs
- type CommandInput
- type CommandOutput
- type CommandState
- type Provider
- type ProviderArgs
- type ProviderInput
- type ProviderOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶
PkgVersion uses reflection to determine the version of the current package.
Types ¶
type Cmd ¶
type Cmd struct { // Specifiy the command to run as an array of arguments Command []string `pulumi:"command"` Environment map[string]string `pulumi:"environment"` // Pass the stdin to a command Stdin *string `pulumi:"stdin"` }
Command specification
type CmdArgs ¶
type CmdArgs struct { // Specifiy the command to run as an array of arguments Command pulumi.StringArrayInput `pulumi:"command"` Environment pulumi.StringMapInput `pulumi:"environment"` // Pass the stdin to a command Stdin pulumi.StringPtrInput `pulumi:"stdin"` }
Command specification
func (CmdArgs) ElementType ¶
func (CmdArgs) ToCmdOutput ¶
func (CmdArgs) ToCmdOutputWithContext ¶
func (CmdArgs) ToCmdPtrOutput ¶
func (i CmdArgs) ToCmdPtrOutput() CmdPtrOutput
func (CmdArgs) ToCmdPtrOutputWithContext ¶
func (i CmdArgs) ToCmdPtrOutputWithContext(ctx context.Context) CmdPtrOutput
type CmdInput ¶
type CmdInput interface { pulumi.Input ToCmdOutput() CmdOutput ToCmdOutputWithContext(context.Context) CmdOutput }
CmdInput is an input type that accepts CmdArgs and CmdOutput values. You can construct a concrete instance of `CmdInput` via:
CmdArgs{...}
type CmdOutput ¶
type CmdOutput struct{ *pulumi.OutputState }
Command specification
func (CmdOutput) Command ¶
func (o CmdOutput) Command() pulumi.StringArrayOutput
Specifiy the command to run as an array of arguments
func (CmdOutput) ElementType ¶
func (CmdOutput) Environment ¶
func (o CmdOutput) Environment() pulumi.StringMapOutput
func (CmdOutput) Stdin ¶
func (o CmdOutput) Stdin() pulumi.StringPtrOutput
Pass the stdin to a command
func (CmdOutput) ToCmdOutput ¶
func (CmdOutput) ToCmdOutputWithContext ¶
func (CmdOutput) ToCmdPtrOutput ¶
func (o CmdOutput) ToCmdPtrOutput() CmdPtrOutput
func (CmdOutput) ToCmdPtrOutputWithContext ¶
func (o CmdOutput) ToCmdPtrOutputWithContext(ctx context.Context) CmdPtrOutput
type CmdPtrInput ¶
type CmdPtrInput interface { pulumi.Input ToCmdPtrOutput() CmdPtrOutput ToCmdPtrOutputWithContext(context.Context) CmdPtrOutput }
CmdPtrInput is an input type that accepts CmdArgs, CmdPtr and CmdPtrOutput values. You can construct a concrete instance of `CmdPtrInput` via:
CmdArgs{...} or: nil
func CmdPtr ¶
func CmdPtr(v *CmdArgs) CmdPtrInput
type CmdPtrOutput ¶
type CmdPtrOutput struct{ *pulumi.OutputState }
func (CmdPtrOutput) Command ¶
func (o CmdPtrOutput) Command() pulumi.StringArrayOutput
Specifiy the command to run as an array of arguments
func (CmdPtrOutput) Elem ¶
func (o CmdPtrOutput) Elem() CmdOutput
func (CmdPtrOutput) ElementType ¶
func (CmdPtrOutput) ElementType() reflect.Type
func (CmdPtrOutput) Environment ¶
func (o CmdPtrOutput) Environment() pulumi.StringMapOutput
func (CmdPtrOutput) Stdin ¶
func (o CmdPtrOutput) Stdin() pulumi.StringPtrOutput
Pass the stdin to a command
func (CmdPtrOutput) ToCmdPtrOutput ¶
func (o CmdPtrOutput) ToCmdPtrOutput() CmdPtrOutput
func (CmdPtrOutput) ToCmdPtrOutputWithContext ¶
func (o CmdPtrOutput) ToCmdPtrOutputWithContext(ctx context.Context) CmdPtrOutput
type Command ¶
type Command struct { pulumi.CustomResourceState Compare pulumi.StringPtrOutput `pulumi:"compare"` // Define a command to create a resource. Create CmdPtrOutput `pulumi:"create"` Delete CmdPtrOutput `pulumi:"delete"` // Specify a command to run to diff the resource. // // Exit 0 to run update. // Exit with a non-zero value or omit to disable update. // Hint: an easy method to always run update is to set diff to `['true']` Diff CmdPtrOutput `pulumi:"diff"` // Define a command to create read the resource. Read CmdPtrOutput `pulumi:"read"` // stderr of the command Stderr pulumi.StringPtrOutput `pulumi:"stderr"` // stdout of the command Stdout pulumi.StringPtrOutput `pulumi:"stdout"` // If unspecified, create definition will be used. Define to provide an alternate update command. Update CmdPtrOutput `pulumi:"update"` }
Execute a Command and save it as a resource.
Each command can be specified as an object or a convenience array. If only `create` is specified, `update` will use the create definition. The `compare` property will be JSON serialized with a hash saved in the state. This is useful to ensure update is run if dependendent resources change.
An update will occur in these cases: 1. The `compare` hash or the `update` arguments change. 2. The specified `diff` command exits with an error.
func GetCommand ¶
func GetCommand(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CommandState, opts ...pulumi.ResourceOption) (*Command, error)
GetCommand gets an existing Command resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewCommand ¶
func NewCommand(ctx *pulumi.Context, name string, args *CommandArgs, opts ...pulumi.ResourceOption) (*Command, error)
NewCommand registers a new resource with the given unique name, arguments, and options.
func (*Command) ElementType ¶
func (*Command) ToCommandOutput ¶
func (i *Command) ToCommandOutput() CommandOutput
func (*Command) ToCommandOutputWithContext ¶
func (i *Command) ToCommandOutputWithContext(ctx context.Context) CommandOutput
type CommandArgs ¶
type CommandArgs struct { // Define a command to create a resource. Create CmdInput Delete CmdPtrInput // Specify a command to run to diff the resource. // // Exit 0 to run update. // Exit with a non-zero value or omit to disable update. // Hint: an easy method to always run update is to set diff to `['true']` Diff CmdPtrInput // Define a command to create read the resource. Read CmdPtrInput // If unspecified, create definition will be used. Define to provide an alternate update command. Update CmdPtrInput }
The set of arguments for constructing a Command resource.
func (CommandArgs) ElementType ¶
func (CommandArgs) ElementType() reflect.Type
type CommandInput ¶
type CommandInput interface { pulumi.Input ToCommandOutput() CommandOutput ToCommandOutputWithContext(ctx context.Context) CommandOutput }
type CommandOutput ¶
type CommandOutput struct{ *pulumi.OutputState }
func (CommandOutput) ElementType ¶
func (CommandOutput) ElementType() reflect.Type
func (CommandOutput) ToCommandOutput ¶
func (o CommandOutput) ToCommandOutput() CommandOutput
func (CommandOutput) ToCommandOutputWithContext ¶
func (o CommandOutput) ToCommandOutputWithContext(ctx context.Context) CommandOutput
type CommandState ¶
type CommandState struct { }
func (CommandState) ElementType ¶
func (CommandState) ElementType() reflect.Type
type Provider ¶
type Provider struct {
pulumi.ProviderResourceState
}
func NewProvider ¶
func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)
NewProvider registers a new resource with the given unique name, arguments, and options.
func (*Provider) ElementType ¶
func (*Provider) ToProviderOutput ¶
func (i *Provider) ToProviderOutput() ProviderOutput
func (*Provider) ToProviderOutputWithContext ¶
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
type ProviderArgs ¶
type ProviderArgs struct { }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type ProviderInput ¶
type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput }
type ProviderOutput ¶
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType ¶
func (ProviderOutput) ElementType() reflect.Type
func (ProviderOutput) ToProviderOutput ¶
func (o ProviderOutput) ToProviderOutput() ProviderOutput
func (ProviderOutput) ToProviderOutputWithContext ¶
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput