local

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// Capture stdout in logs but not stderr
	LoggingStdout = Logging("stdout")
	// Capture stderr in logs but not stdout
	LoggingStderr = Logging("stderr")
	// Capture stdout and stderr in logs
	LoggingStdoutAndStderr = Logging("stdoutAndStderr")
	// Capture no logs
	LoggingNone = Logging("none")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	pulumi.CustomResourceState

	// If the previous command's stdout and stderr (as generated by the prior create/update) is
	// injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
	// Defaults to true.
	AddPreviousOutputInEnv pulumi.BoolPtrOutput `pulumi:"addPreviousOutputInEnv"`
	// An archive asset containing files found after running the command.
	Archive pulumi.ArchiveOutput `pulumi:"archive"`
	// A list of path globs to return as a single archive asset after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	ArchivePaths pulumi.StringArrayOutput `pulumi:"archivePaths"`
	// A list of path globs to read after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	AssetPaths pulumi.StringArrayOutput `pulumi:"assetPaths"`
	// A map of assets found after running the command.
	// The key is the relative path from the command dir
	Assets pulumi.AssetOrArchiveMapOutput `pulumi:"assets"`
	// The command to run on create.
	Create pulumi.StringPtrOutput `pulumi:"create"`
	// The command to run on delete. The environment variables PULUMI_COMMAND_STDOUT
	// and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the
	// Command resource from previous create or update steps.
	Delete pulumi.StringPtrOutput `pulumi:"delete"`
	// The directory from which to run the command from. If `dir` does not exist, then
	// `Command` will fail.
	Dir pulumi.StringPtrOutput `pulumi:"dir"`
	// Additional environment variables available to the command's process.
	Environment pulumi.StringMapOutput `pulumi:"environment"`
	// The program and arguments to run the command.
	// On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
	Interpreter pulumi.StringArrayOutput `pulumi:"interpreter"`
	// If the command's stdout and stderr should be logged. This doesn't affect the capturing of
	// stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
	// outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
	Logging LoggingPtrOutput `pulumi:"logging"`
	// The standard error of the command's process
	Stderr pulumi.StringOutput `pulumi:"stderr"`
	// Pass a string to the command's process as standard in
	Stdin pulumi.StringPtrOutput `pulumi:"stdin"`
	// The standard output of the command's process
	Stdout pulumi.StringOutput `pulumi:"stdout"`
	// Trigger replacements on changes to this input.
	Triggers pulumi.ArrayOutput `pulumi:"triggers"`
	// The command to run on update, if empty, create will
	// run again. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR
	// are set to the stdout and stderr properties of the Command resource from previous
	// create or update steps.
	Update pulumi.StringPtrOutput `pulumi:"update"`
}

A local command to be executed. This command can be inserted into the life cycles of other resources using the `dependsOn` or `parent` resource options. A command is considered to have failed when it finished with a non-zero exit code. This will fail the CRUD step of the `Command` resource.

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) ElementType() reflect.Type

func (*Command) ToCommandOutput

func (i *Command) ToCommandOutput() CommandOutput

func (*Command) ToCommandOutputWithContext

func (i *Command) ToCommandOutputWithContext(ctx context.Context) CommandOutput

type CommandArgs

type CommandArgs struct {
	// If the previous command's stdout and stderr (as generated by the prior create/update) is
	// injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
	// Defaults to true.
	AddPreviousOutputInEnv pulumi.BoolPtrInput
	// A list of path globs to return as a single archive asset after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	ArchivePaths pulumi.StringArrayInput
	// A list of path globs to read after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	AssetPaths pulumi.StringArrayInput
	// The command to run on create.
	Create pulumi.StringPtrInput
	// The command to run on delete. The environment variables PULUMI_COMMAND_STDOUT
	// and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the
	// Command resource from previous create or update steps.
	Delete pulumi.StringPtrInput
	// The directory from which to run the command from. If `dir` does not exist, then
	// `Command` will fail.
	Dir pulumi.StringPtrInput
	// Additional environment variables available to the command's process.
	Environment pulumi.StringMapInput
	// The program and arguments to run the command.
	// On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
	Interpreter pulumi.StringArrayInput
	// If the command's stdout and stderr should be logged. This doesn't affect the capturing of
	// stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
	// outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
	Logging LoggingPtrInput
	// Pass a string to the command's process as standard in
	Stdin pulumi.StringPtrInput
	// Trigger replacements on changes to this input.
	Triggers pulumi.ArrayInput
	// The command to run on update, if empty, create will
	// run again. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR
	// are set to the stdout and stderr properties of the Command resource from previous
	// create or update steps.
	Update pulumi.StringPtrInput
}

The set of arguments for constructing a Command resource.

func (CommandArgs) ElementType

func (CommandArgs) ElementType() reflect.Type

type CommandArray

type CommandArray []CommandInput

func (CommandArray) ElementType

func (CommandArray) ElementType() reflect.Type

func (CommandArray) ToCommandArrayOutput

func (i CommandArray) ToCommandArrayOutput() CommandArrayOutput

func (CommandArray) ToCommandArrayOutputWithContext

func (i CommandArray) ToCommandArrayOutputWithContext(ctx context.Context) CommandArrayOutput

type CommandArrayInput

type CommandArrayInput interface {
	pulumi.Input

	ToCommandArrayOutput() CommandArrayOutput
	ToCommandArrayOutputWithContext(context.Context) CommandArrayOutput
}

CommandArrayInput is an input type that accepts CommandArray and CommandArrayOutput values. You can construct a concrete instance of `CommandArrayInput` via:

CommandArray{ CommandArgs{...} }

type CommandArrayOutput

type CommandArrayOutput struct{ *pulumi.OutputState }

func (CommandArrayOutput) ElementType

func (CommandArrayOutput) ElementType() reflect.Type

func (CommandArrayOutput) Index

func (CommandArrayOutput) ToCommandArrayOutput

func (o CommandArrayOutput) ToCommandArrayOutput() CommandArrayOutput

func (CommandArrayOutput) ToCommandArrayOutputWithContext

func (o CommandArrayOutput) ToCommandArrayOutputWithContext(ctx context.Context) CommandArrayOutput

type CommandInput

type CommandInput interface {
	pulumi.Input

	ToCommandOutput() CommandOutput
	ToCommandOutputWithContext(ctx context.Context) CommandOutput
}

type CommandMap

type CommandMap map[string]CommandInput

func (CommandMap) ElementType

func (CommandMap) ElementType() reflect.Type

func (CommandMap) ToCommandMapOutput

func (i CommandMap) ToCommandMapOutput() CommandMapOutput

func (CommandMap) ToCommandMapOutputWithContext

func (i CommandMap) ToCommandMapOutputWithContext(ctx context.Context) CommandMapOutput

type CommandMapInput

type CommandMapInput interface {
	pulumi.Input

	ToCommandMapOutput() CommandMapOutput
	ToCommandMapOutputWithContext(context.Context) CommandMapOutput
}

CommandMapInput is an input type that accepts CommandMap and CommandMapOutput values. You can construct a concrete instance of `CommandMapInput` via:

CommandMap{ "key": CommandArgs{...} }

type CommandMapOutput

type CommandMapOutput struct{ *pulumi.OutputState }

func (CommandMapOutput) ElementType

func (CommandMapOutput) ElementType() reflect.Type

func (CommandMapOutput) MapIndex

func (CommandMapOutput) ToCommandMapOutput

func (o CommandMapOutput) ToCommandMapOutput() CommandMapOutput

func (CommandMapOutput) ToCommandMapOutputWithContext

func (o CommandMapOutput) ToCommandMapOutputWithContext(ctx context.Context) CommandMapOutput

type CommandOutput

type CommandOutput struct{ *pulumi.OutputState }

func (CommandOutput) AddPreviousOutputInEnv added in v0.10.0

func (o CommandOutput) AddPreviousOutputInEnv() pulumi.BoolPtrOutput

If the previous command's stdout and stderr (as generated by the prior create/update) is injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR. Defaults to true.

func (CommandOutput) Archive added in v0.4.0

func (o CommandOutput) Archive() pulumi.ArchiveOutput

An archive asset containing files found after running the command.

func (CommandOutput) ArchivePaths added in v0.4.0

func (o CommandOutput) ArchivePaths() pulumi.StringArrayOutput

A list of path globs to return as a single archive asset after the command completes.

When specifying glob patterns the following rules apply: - We only include files not directories for assets and archives. - Path separators are `/` on all platforms - including Windows. - Patterns starting with `!` are 'exclude' rules. - Rules are evaluated in order, so exclude rules should be after inclusion rules. - `*` matches anything except `/` - `**` matches anything, _including_ `/` - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`. - For full details of the globbing syntax, see github.com/gobwas/glob(https://github.com/gobwas/glob)

#### Example

Given the rules:

When evaluating against this folder:

The following paths will be returned:

func (CommandOutput) AssetPaths added in v0.4.0

func (o CommandOutput) AssetPaths() pulumi.StringArrayOutput

A list of path globs to read after the command completes.

When specifying glob patterns the following rules apply: - We only include files not directories for assets and archives. - Path separators are `/` on all platforms - including Windows. - Patterns starting with `!` are 'exclude' rules. - Rules are evaluated in order, so exclude rules should be after inclusion rules. - `*` matches anything except `/` - `**` matches anything, _including_ `/` - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`. - For full details of the globbing syntax, see github.com/gobwas/glob(https://github.com/gobwas/glob)

#### Example

Given the rules:

When evaluating against this folder:

The following paths will be returned:

func (CommandOutput) Assets added in v0.4.0

A map of assets found after running the command. The key is the relative path from the command dir

func (CommandOutput) Create added in v0.2.0

The command to run on create.

func (CommandOutput) Delete added in v0.2.0

The command to run on delete. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the Command resource from previous create or update steps.

func (CommandOutput) Dir added in v0.2.0

The directory from which to run the command from. If `dir` does not exist, then `Command` will fail.

func (CommandOutput) ElementType

func (CommandOutput) ElementType() reflect.Type

func (CommandOutput) Environment added in v0.2.0

func (o CommandOutput) Environment() pulumi.StringMapOutput

Additional environment variables available to the command's process.

func (CommandOutput) Interpreter added in v0.2.0

func (o CommandOutput) Interpreter() pulumi.StringArrayOutput

The program and arguments to run the command. On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`

func (CommandOutput) Logging added in v0.11.0

func (o CommandOutput) Logging() LoggingPtrOutput

If the command's stdout and stderr should be logged. This doesn't affect the capturing of stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.

func (CommandOutput) Stderr added in v0.2.0

func (o CommandOutput) Stderr() pulumi.StringOutput

The standard error of the command's process

func (CommandOutput) Stdin added in v0.2.0

Pass a string to the command's process as standard in

func (CommandOutput) Stdout added in v0.2.0

func (o CommandOutput) Stdout() pulumi.StringOutput

The standard output of the command's process

func (CommandOutput) ToCommandOutput

func (o CommandOutput) ToCommandOutput() CommandOutput

func (CommandOutput) ToCommandOutputWithContext

func (o CommandOutput) ToCommandOutputWithContext(ctx context.Context) CommandOutput

func (CommandOutput) Triggers added in v0.2.0

func (o CommandOutput) Triggers() pulumi.ArrayOutput

Trigger replacements on changes to this input.

func (CommandOutput) Update added in v0.2.0

The command to run on update, if empty, create will run again. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the Command resource from previous create or update steps.

type CommandState

type CommandState struct {
}

func (CommandState) ElementType

func (CommandState) ElementType() reflect.Type

type Logging added in v0.11.1

type Logging string

func (Logging) ElementType added in v0.11.1

func (Logging) ElementType() reflect.Type

func (Logging) ToLoggingOutput added in v0.11.1

func (e Logging) ToLoggingOutput() LoggingOutput

func (Logging) ToLoggingOutputWithContext added in v0.11.1

func (e Logging) ToLoggingOutputWithContext(ctx context.Context) LoggingOutput

func (Logging) ToLoggingPtrOutput added in v0.11.1

func (e Logging) ToLoggingPtrOutput() LoggingPtrOutput

func (Logging) ToLoggingPtrOutputWithContext added in v0.11.1

func (e Logging) ToLoggingPtrOutputWithContext(ctx context.Context) LoggingPtrOutput

func (Logging) ToStringOutput added in v0.11.1

func (e Logging) ToStringOutput() pulumi.StringOutput

func (Logging) ToStringOutputWithContext added in v0.11.1

func (e Logging) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (Logging) ToStringPtrOutput added in v0.11.1

func (e Logging) ToStringPtrOutput() pulumi.StringPtrOutput

func (Logging) ToStringPtrOutputWithContext added in v0.11.1

func (e Logging) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type LoggingInput added in v0.11.1

type LoggingInput interface {
	pulumi.Input

	ToLoggingOutput() LoggingOutput
	ToLoggingOutputWithContext(context.Context) LoggingOutput
}

LoggingInput is an input type that accepts values of the Logging enum A concrete instance of `LoggingInput` can be one of the following:

LoggingStdout
LoggingStderr
LoggingStdoutAndStderr
LoggingNone

type LoggingOutput added in v0.11.1

type LoggingOutput struct{ *pulumi.OutputState }

func (LoggingOutput) ElementType added in v0.11.1

func (LoggingOutput) ElementType() reflect.Type

func (LoggingOutput) ToLoggingOutput added in v0.11.1

func (o LoggingOutput) ToLoggingOutput() LoggingOutput

func (LoggingOutput) ToLoggingOutputWithContext added in v0.11.1

func (o LoggingOutput) ToLoggingOutputWithContext(ctx context.Context) LoggingOutput

func (LoggingOutput) ToLoggingPtrOutput added in v0.11.1

func (o LoggingOutput) ToLoggingPtrOutput() LoggingPtrOutput

func (LoggingOutput) ToLoggingPtrOutputWithContext added in v0.11.1

func (o LoggingOutput) ToLoggingPtrOutputWithContext(ctx context.Context) LoggingPtrOutput

func (LoggingOutput) ToStringOutput added in v0.11.1

func (o LoggingOutput) ToStringOutput() pulumi.StringOutput

func (LoggingOutput) ToStringOutputWithContext added in v0.11.1

func (o LoggingOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput

func (LoggingOutput) ToStringPtrOutput added in v0.11.1

func (o LoggingOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (LoggingOutput) ToStringPtrOutputWithContext added in v0.11.1

func (o LoggingOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type LoggingPtrInput added in v0.11.1

type LoggingPtrInput interface {
	pulumi.Input

	ToLoggingPtrOutput() LoggingPtrOutput
	ToLoggingPtrOutputWithContext(context.Context) LoggingPtrOutput
}

func LoggingPtr added in v0.11.1

func LoggingPtr(v string) LoggingPtrInput

type LoggingPtrOutput added in v0.11.1

type LoggingPtrOutput struct{ *pulumi.OutputState }

func (LoggingPtrOutput) Elem added in v0.11.1

func (LoggingPtrOutput) ElementType added in v0.11.1

func (LoggingPtrOutput) ElementType() reflect.Type

func (LoggingPtrOutput) ToLoggingPtrOutput added in v0.11.1

func (o LoggingPtrOutput) ToLoggingPtrOutput() LoggingPtrOutput

func (LoggingPtrOutput) ToLoggingPtrOutputWithContext added in v0.11.1

func (o LoggingPtrOutput) ToLoggingPtrOutputWithContext(ctx context.Context) LoggingPtrOutput

func (LoggingPtrOutput) ToStringPtrOutput added in v0.11.1

func (o LoggingPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput

func (LoggingPtrOutput) ToStringPtrOutputWithContext added in v0.11.1

func (o LoggingPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput

type RunArgs added in v0.4.0

type RunArgs struct {
	// If the previous command's stdout and stderr (as generated by the prior create/update) is
	// injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
	// Defaults to true.
	AddPreviousOutputInEnv *bool `pulumi:"addPreviousOutputInEnv"`
	// A list of path globs to return as a single archive asset after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	ArchivePaths []string `pulumi:"archivePaths"`
	// A list of path globs to read after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	AssetPaths []string `pulumi:"assetPaths"`
	// The command to run.
	Command string `pulumi:"command"`
	// The directory from which to run the command from. If `dir` does not exist, then
	// `Command` will fail.
	Dir *string `pulumi:"dir"`
	// Additional environment variables available to the command's process.
	Environment map[string]string `pulumi:"environment"`
	// The program and arguments to run the command.
	// On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
	Interpreter []string `pulumi:"interpreter"`
	// If the command's stdout and stderr should be logged. This doesn't affect the capturing of
	// stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
	// outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
	Logging *Logging `pulumi:"logging"`
	// Pass a string to the command's process as standard in
	Stdin *string `pulumi:"stdin"`
}

func (*RunArgs) Defaults added in v0.10.0

func (val *RunArgs) Defaults() *RunArgs

Defaults sets the appropriate defaults for RunArgs

type RunOutputArgs added in v0.4.0

type RunOutputArgs struct {
	// If the previous command's stdout and stderr (as generated by the prior create/update) is
	// injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
	// Defaults to true.
	AddPreviousOutputInEnv pulumi.BoolPtrInput `pulumi:"addPreviousOutputInEnv"`
	// A list of path globs to return as a single archive asset after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	ArchivePaths pulumi.StringArrayInput `pulumi:"archivePaths"`
	// A list of path globs to read after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	AssetPaths pulumi.StringArrayInput `pulumi:"assetPaths"`
	// The command to run.
	Command pulumi.StringInput `pulumi:"command"`
	// The directory from which to run the command from. If `dir` does not exist, then
	// `Command` will fail.
	Dir pulumi.StringPtrInput `pulumi:"dir"`
	// Additional environment variables available to the command's process.
	Environment pulumi.StringMapInput `pulumi:"environment"`
	// The program and arguments to run the command.
	// On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
	Interpreter pulumi.StringArrayInput `pulumi:"interpreter"`
	// If the command's stdout and stderr should be logged. This doesn't affect the capturing of
	// stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
	// outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
	Logging LoggingPtrInput `pulumi:"logging"`
	// Pass a string to the command's process as standard in
	Stdin pulumi.StringPtrInput `pulumi:"stdin"`
}

func (RunOutputArgs) ElementType added in v0.4.0

func (RunOutputArgs) ElementType() reflect.Type

type RunResult added in v0.4.0

type RunResult struct {
	// If the previous command's stdout and stderr (as generated by the prior create/update) is
	// injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
	// Defaults to true.
	AddPreviousOutputInEnv *bool `pulumi:"addPreviousOutputInEnv"`
	// An archive asset containing files found after running the command.
	Archive pulumi.Archive `pulumi:"archive"`
	// A list of path globs to return as a single archive asset after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	ArchivePaths []string `pulumi:"archivePaths"`
	// A list of path globs to read after the command completes.
	//
	// When specifying glob patterns the following rules apply:
	// - We only include files not directories for assets and archives.
	// - Path separators are `/` on all platforms - including Windows.
	// - Patterns starting with `!` are 'exclude' rules.
	// - Rules are evaluated in order, so exclude rules should be after inclusion rules.
	// - `*` matches anything except `/`
	// - `**` matches anything, _including_ `/`
	// - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
	// - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
	//
	// #### Example
	//
	// Given the rules:
	//
	// When evaluating against this folder:
	//
	// The following paths will be returned:
	AssetPaths []string `pulumi:"assetPaths"`
	// A map of assets found after running the command.
	// The key is the relative path from the command dir
	Assets map[string]pulumi.AssetOrArchive `pulumi:"assets"`
	// The command to run.
	Command string `pulumi:"command"`
	// The directory from which to run the command from. If `dir` does not exist, then
	// `Command` will fail.
	Dir *string `pulumi:"dir"`
	// Additional environment variables available to the command's process.
	Environment map[string]string `pulumi:"environment"`
	// The program and arguments to run the command.
	// On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
	Interpreter []string `pulumi:"interpreter"`
	// If the command's stdout and stderr should be logged. This doesn't affect the capturing of
	// stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
	// outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
	Logging *Logging `pulumi:"logging"`
	// The standard error of the command's process
	Stderr string `pulumi:"stderr"`
	// Pass a string to the command's process as standard in
	Stdin *string `pulumi:"stdin"`
	// The standard output of the command's process
	Stdout string `pulumi:"stdout"`
}

func Run added in v0.4.0

func Run(ctx *pulumi.Context, args *RunArgs, opts ...pulumi.InvokeOption) (*RunResult, error)

A local command to be executed. This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.

func (*RunResult) Defaults added in v0.10.0

func (val *RunResult) Defaults() *RunResult

Defaults sets the appropriate defaults for RunResult

type RunResultOutput added in v0.4.0

type RunResultOutput struct{ *pulumi.OutputState }

func RunOutput added in v0.4.0

func RunOutput(ctx *pulumi.Context, args RunOutputArgs, opts ...pulumi.InvokeOption) RunResultOutput

func (RunResultOutput) AddPreviousOutputInEnv added in v0.10.0

func (o RunResultOutput) AddPreviousOutputInEnv() pulumi.BoolPtrOutput

If the previous command's stdout and stderr (as generated by the prior create/update) is injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR. Defaults to true.

func (RunResultOutput) Archive added in v0.4.0

func (o RunResultOutput) Archive() pulumi.ArchiveOutput

An archive asset containing files found after running the command.

func (RunResultOutput) ArchivePaths added in v0.7.0

func (o RunResultOutput) ArchivePaths() pulumi.StringArrayOutput

A list of path globs to return as a single archive asset after the command completes.

When specifying glob patterns the following rules apply: - We only include files not directories for assets and archives. - Path separators are `/` on all platforms - including Windows. - Patterns starting with `!` are 'exclude' rules. - Rules are evaluated in order, so exclude rules should be after inclusion rules. - `*` matches anything except `/` - `**` matches anything, _including_ `/` - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`. - For full details of the globbing syntax, see github.com/gobwas/glob(https://github.com/gobwas/glob)

#### Example

Given the rules:

When evaluating against this folder:

The following paths will be returned:

func (RunResultOutput) AssetPaths added in v0.7.0

func (o RunResultOutput) AssetPaths() pulumi.StringArrayOutput

A list of path globs to read after the command completes.

When specifying glob patterns the following rules apply: - We only include files not directories for assets and archives. - Path separators are `/` on all platforms - including Windows. - Patterns starting with `!` are 'exclude' rules. - Rules are evaluated in order, so exclude rules should be after inclusion rules. - `*` matches anything except `/` - `**` matches anything, _including_ `/` - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`. - For full details of the globbing syntax, see github.com/gobwas/glob(https://github.com/gobwas/glob)

#### Example

Given the rules:

When evaluating against this folder:

The following paths will be returned:

func (RunResultOutput) Assets added in v0.4.0

A map of assets found after running the command. The key is the relative path from the command dir

func (RunResultOutput) Command added in v0.4.0

func (o RunResultOutput) Command() pulumi.StringOutput

The command to run.

func (RunResultOutput) Dir added in v0.4.0

The directory from which to run the command from. If `dir` does not exist, then `Command` will fail.

func (RunResultOutput) ElementType added in v0.4.0

func (RunResultOutput) ElementType() reflect.Type

func (RunResultOutput) Environment added in v0.4.0

func (o RunResultOutput) Environment() pulumi.StringMapOutput

Additional environment variables available to the command's process.

func (RunResultOutput) Interpreter added in v0.4.0

func (o RunResultOutput) Interpreter() pulumi.StringArrayOutput

The program and arguments to run the command. On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`

func (RunResultOutput) Logging added in v0.11.0

func (o RunResultOutput) Logging() LoggingPtrOutput

If the command's stdout and stderr should be logged. This doesn't affect the capturing of stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.

func (RunResultOutput) Stderr added in v0.4.0

func (o RunResultOutput) Stderr() pulumi.StringOutput

The standard error of the command's process

func (RunResultOutput) Stdin added in v0.4.0

Pass a string to the command's process as standard in

func (RunResultOutput) Stdout added in v0.4.0

func (o RunResultOutput) Stdout() pulumi.StringOutput

The standard output of the command's process

func (RunResultOutput) ToRunResultOutput added in v0.4.0

func (o RunResultOutput) ToRunResultOutput() RunResultOutput

func (RunResultOutput) ToRunResultOutputWithContext added in v0.4.0

func (o RunResultOutput) ToRunResultOutputWithContext(ctx context.Context) RunResultOutput

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL