1. Packages
  2. Command
  3. API Docs
  4. local
  5. run
Command v1.0.1 published on Thursday, Jul 18, 2024 by Pulumi

command.local.run

Explore with Pulumi AI

command logo
Command v1.0.1 published on Thursday, Jul 18, 2024 by Pulumi

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

    Using run

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function run(args: RunArgs, opts?: InvokeOptions): Promise<RunResult>
    function runOutput(args: RunOutputArgs, opts?: InvokeOptions): Output<RunResult>
    def run(add_previous_output_in_env: Optional[bool] = None,
            archive_paths: Optional[Sequence[str]] = None,
            asset_paths: Optional[Sequence[str]] = None,
            command: Optional[str] = None,
            dir: Optional[str] = None,
            environment: Optional[Mapping[str, str]] = None,
            interpreter: Optional[Sequence[str]] = None,
            logging: Optional[Logging] = None,
            stdin: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> RunResult
    def run_output(add_previous_output_in_env: Optional[pulumi.Input[bool]] = None,
            archive_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            asset_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            command: Optional[pulumi.Input[str]] = None,
            dir: Optional[pulumi.Input[str]] = None,
            environment: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            interpreter: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            logging: Optional[pulumi.Input[Logging]] = None,
            stdin: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[RunResult]
    func Run(ctx *Context, args *RunArgs, opts ...InvokeOption) (*RunResult, error)
    func RunOutput(ctx *Context, args *RunOutputArgs, opts ...InvokeOption) RunResultOutput

    > Note: This function is named Run in the Go SDK.

    public static class Run 
    {
        public static Task<RunResult> InvokeAsync(RunArgs args, InvokeOptions? opts = null)
        public static Output<RunResult> Invoke(RunInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<RunResult> run(RunArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: command:local:run
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Command string
    The command to run.
    AddPreviousOutputInEnv bool
    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.
    ArchivePaths List<string>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    AssetPaths List<string>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    Dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    Environment Dictionary<string, string>
    Additional environment variables available to the command's process.
    Interpreter List<string>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    Logging Pulumi.Command.Local.Logging
    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.
    Stdin string
    Pass a string to the command's process as standard in
    Command string
    The command to run.
    AddPreviousOutputInEnv bool
    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.
    ArchivePaths []string

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    AssetPaths []string

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    Dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    Environment map[string]string
    Additional environment variables available to the command's process.
    Interpreter []string
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    Logging Logging
    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.
    Stdin string
    Pass a string to the command's process as standard in
    command String
    The command to run.
    addPreviousOutputInEnv Boolean
    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.
    archivePaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    dir String
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Map<String,String>
    Additional environment variables available to the command's process.
    interpreter List<String>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin String
    Pass a string to the command's process as standard in
    command string
    The command to run.
    addPreviousOutputInEnv boolean
    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.
    archivePaths string[]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths string[]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment {[key: string]: string}
    Additional environment variables available to the command's process.
    interpreter string[]
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin string
    Pass a string to the command's process as standard in
    command str
    The command to run.
    add_previous_output_in_env bool
    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.
    archive_paths Sequence[str]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    asset_paths Sequence[str]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    dir str
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Mapping[str, str]
    Additional environment variables available to the command's process.
    interpreter Sequence[str]
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin str
    Pass a string to the command's process as standard in
    command String
    The command to run.
    addPreviousOutputInEnv Boolean
    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.
    archivePaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    dir String
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Map<String>
    Additional environment variables available to the command's process.
    interpreter List<String>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging "stdout" | "stderr" | "stdoutAndStderr" | "none"
    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.
    stdin String
    Pass a string to the command's process as standard in

    run Result

    The following output properties are available:

    Command string
    The command to run.
    Stderr string
    The standard error of the command's process
    Stdout string
    The standard output of the command's process
    AddPreviousOutputInEnv bool
    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.
    Archive Archive
    An archive asset containing files found after running the command.
    ArchivePaths List<string>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    AssetPaths List<string>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    Assets Dictionary<string, AssetOrArchive>
    A map of assets found after running the command. The key is the relative path from the command dir
    Dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    Environment Dictionary<string, string>
    Additional environment variables available to the command's process.
    Interpreter List<string>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    Logging Pulumi.Command.Local.Logging
    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.
    Stdin string
    Pass a string to the command's process as standard in
    Command string
    The command to run.
    Stderr string
    The standard error of the command's process
    Stdout string
    The standard output of the command's process
    AddPreviousOutputInEnv bool
    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.
    Archive pulumi.Archive
    An archive asset containing files found after running the command.
    ArchivePaths []string

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    AssetPaths []string

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    Assets AssetOrArchive
    A map of assets found after running the command. The key is the relative path from the command dir
    Dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    Environment map[string]string
    Additional environment variables available to the command's process.
    Interpreter []string
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    Logging Logging
    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.
    Stdin string
    Pass a string to the command's process as standard in
    command String
    The command to run.
    stderr String
    The standard error of the command's process
    stdout String
    The standard output of the command's process
    addPreviousOutputInEnv Boolean
    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.
    archive Archive
    An archive asset containing files found after running the command.
    archivePaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assets Map<String,AssetOrArchive>
    A map of assets found after running the command. The key is the relative path from the command dir
    dir String
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Map<String,String>
    Additional environment variables available to the command's process.
    interpreter List<String>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin String
    Pass a string to the command's process as standard in
    command string
    The command to run.
    stderr string
    The standard error of the command's process
    stdout string
    The standard output of the command's process
    addPreviousOutputInEnv boolean
    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.
    archive pulumi.asset.Archive
    An archive asset containing files found after running the command.
    archivePaths string[]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths string[]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assets {[key: string]: pulumi.asset.Asset | pulumi.asset.Archive}
    A map of assets found after running the command. The key is the relative path from the command dir
    dir string
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment {[key: string]: string}
    Additional environment variables available to the command's process.
    interpreter string[]
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin string
    Pass a string to the command's process as standard in
    command str
    The command to run.
    stderr str
    The standard error of the command's process
    stdout str
    The standard output of the command's process
    add_previous_output_in_env bool
    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.
    archive pulumi.Archive
    An archive asset containing files found after running the command.
    archive_paths Sequence[str]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    asset_paths Sequence[str]

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assets Mapping[str, Union[pulumi.Asset, pulumi.Archive]]
    A map of assets found after running the command. The key is the relative path from the command dir
    dir str
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Mapping[str, str]
    Additional environment variables available to the command's process.
    interpreter Sequence[str]
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging Logging
    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.
    stdin str
    Pass a string to the command's process as standard in
    command String
    The command to run.
    stderr String
    The standard error of the command's process
    stdout String
    The standard output of the command's process
    addPreviousOutputInEnv Boolean
    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.
    archive Archive
    An archive asset containing files found after running the command.
    archivePaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assetPaths List<String>

    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

    Example

    Given the rules:

    - "assets/**"
    - "src/**.js"
    - "!**secret.*"
    

    When evaluating against this folder:

    - assets/
      - logos/
        - logo.svg
    - src/
      - index.js
      - secret.js
    

    The following paths will be returned:

    - assets/logos/logo.svg
    - src/index.js
    
    assets Map<Asset>
    A map of assets found after running the command. The key is the relative path from the command dir
    dir String
    The directory from which to run the command from. If dir does not exist, then Command will fail.
    environment Map<String>
    Additional environment variables available to the command's process.
    interpreter List<String>
    The program and arguments to run the command. On Linux and macOS, defaults to: ["/bin/sh", "-c"]. On Windows, defaults to: ["cmd", "/C"]
    logging "stdout" | "stderr" | "stdoutAndStderr" | "none"
    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.
    stdin String
    Pass a string to the command's process as standard in

    Supporting Types

    Logging

    Package Details

    Repository
    command pulumi/pulumi-command
    License
    Apache-2.0
    command logo
    Command v1.0.1 published on Thursday, Jul 18, 2024 by Pulumi