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

command.remote.CopyToRemote

Explore with Pulumi AI

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

    Copy an Asset or Archive to a remote host.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Command = Pulumi.Command;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var serverPublicIp = config.Require("serverPublicIp");
        var userName = config.Require("userName");
        var privateKey = config.Require("privateKey");
        var payload = config.Require("payload");
        var destDir = config.Require("destDir");
        
        var archive = new FileArchive(payload);
    
        // The configuration of our SSH connection to the instance.
        var conn = new Command.Remote.Inputs.ConnectionArgs
        {
            Host = serverPublicIp,
            User = userName,
            PrivateKey = privateKey,
        };
    
        // Copy the files to the remote.
        var copy = new Command.Remote.CopyToRemote("copy", new()
        {
            Connection = conn,
            Source = archive,
        });
    
        // Verify that the expected files were copied to the remote.
        // We want to run this after each copy, i.e., when something changed,
        // so we use the asset to be copied as a trigger.
        var find = new Command.Remote.Command("find", new()
        {
            Connection = conn,
            Create = $"find {destDir}/{payload} | sort",
            Triggers = new[]
            {
                archive,
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                copy,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["remoteContents"] = find.Stdout,
        };
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-command/sdk/go/command/remote"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		serverPublicIp := cfg.Require("serverPublicIp")
    		userName := cfg.Require("userName")
    		privateKey := cfg.Require("privateKey")
    		payload := cfg.Require("payload")
    		destDir := cfg.Require("destDir")
    
    		archive := pulumi.NewFileArchive(payload)
    
    		conn := remote.ConnectionArgs{
    			Host:       pulumi.String(serverPublicIp),
    			User:       pulumi.String(userName),
    			PrivateKey: pulumi.String(privateKey),
    		}
    
    		copy, err := remote.NewCopyToRemote(ctx, "copy", &remote.CopyToRemoteArgs{
    			Connection: conn,
    			Source:     archive,
    		})
    		if err != nil {
    			return err
    		}
    
    		find, err := remote.NewCommand(ctx, "find", &remote.CommandArgs{
    			Connection: conn,
    			Create:     pulumi.String(fmt.Sprintf("find %v/%v | sort", destDir, payload)),
    			Triggers: pulumi.Array{
    				archive,
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			copy,
    		}))
    		if err != nil {
    			return err
    		}
    
    		ctx.Export("remoteContents", find.Stdout)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.command.remote.Command;
    import com.pulumi.command.remote.CommandArgs;
    import com.pulumi.command.remote.CopyToRemote;
    import com.pulumi.command.remote.inputs.*;
    import com.pulumi.resources.CustomResourceOptions;
    import com.pulumi.asset.FileArchive;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var serverPublicIp = config.require("serverPublicIp");
            final var userName = config.require("userName");
            final var privateKey = config.require("privateKey");
            final var payload = config.require("payload");
            final var destDir = config.require("destDir");
    
            final var archive = new FileArchive(payload);
    
            // The configuration of our SSH connection to the instance.
            final var conn = ConnectionArgs.builder()
                .host(serverPublicIp)
                .user(userName)
                .privateKey(privateKey)
                .build();
    
            // Copy the files to the remote.
            var copy = new CopyToRemote("copy", CopyToRemoteArgs.builder()
                .connection(conn)
                .source(archive)
                .destination(destDir)
                .build());
    
            // Verify that the expected files were copied to the remote.
            // We want to run this after each copy, i.e., when something changed,
            // so we use the asset to be copied as a trigger.
            var find = new Command("find", CommandArgs.builder()
                .connection(conn)
                .create(String.format("find %s/%s | sort", destDir,payload))
                .triggers(archive)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(copy)
                    .build());
    
            ctx.export("remoteContents", find.stdout());
        }
    }
    
    import pulumi
    import pulumi_command as command
    
    config = pulumi.Config()
    
    server_public_ip = config.require("serverPublicIp")
    user_name = config.require("userName")
    private_key = config.require("privateKey")
    payload = config.require("payload")
    dest_dir = config.require("destDir")
    
    archive = pulumi.FileArchive(payload)
    
    # The configuration of our SSH connection to the instance.
    conn = command.remote.ConnectionArgs(
        host = server_public_ip,
        user = user_name,
        privateKey = private_key,
    )
    
    # Copy the files to the remote.
    copy = command.remote.CopyToRemote("copy",
        connection=conn,
        source=archive,
        destination=dest_dir)
    
    # Verify that the expected files were copied to the remote.
    # We want to run this after each copy, i.e., when something changed,
    # so we use the asset to be copied as a trigger.
    find = command.remote.Command("find",
        connection=conn,
        create=f"find {dest_dir}/{payload} | sort",
        triggers=[archive],
        opts = pulumi.ResourceOptions(depends_on=[copy]))
    
    pulumi.export("remoteContents", find.stdout)
    
    import * as pulumi from "@pulumi/pulumi";
    import { remote, types } from "@pulumi/command";
    import * as fs from "fs";
    import * as os from "os";
    import * as path from "path";
    
    export = async () => {
        const config = new pulumi.Config();
    
        // Get the private key to connect to the server. If a key is
        // provided, use it, otherwise default to the standard id_rsa SSH key.
        const privateKeyBase64 = config.get("privateKeyBase64");
        const privateKey = privateKeyBase64 ?
            Buffer.from(privateKeyBase64, 'base64').toString('ascii') :
            fs.readFileSync(path.join(os.homedir(), ".ssh", "id_rsa")).toString("utf8");
    
        const serverPublicIp = config.require("serverPublicIp");
        const userName = config.require("userName");
    
        // The configuration of our SSH connection to the instance.
        const connection: types.input.remote.ConnectionArgs = {
            host: serverPublicIp,
            user: userName,
            privateKey: privateKey,
        };
    
        // Set up source and target of the remote copy.
        const from = config.require("payload")!;
        const archive = new pulumi.asset.FileArchive(from);
        const to = config.require("destDir")!;
    
        // Copy the files to the remote.
        const copy = new remote.CopyToRemote("copy", {
            connection,
            source: archive,
            remotePath: to,
        });
    
        // Verify that the expected files were copied to the remote.
        // We want to run this after each copy, i.e., when something changed,
        // so we use the asset to be copied as a trigger.
        const find = new remote.Command("ls", {
            connection,
            create: `find ${to}/${from} | sort`,
            triggers: [archive],
        }, { dependsOn: copy });
    
        return {
            remoteContents: find.stdout
        }
    }
    
    resources:
      # Copy the files to the remote.
      copy:
        type: command:remote:CopyToRemote
        properties:
          connection: ${conn}
          source: ${archive}
          remotePath: ${destDir}
    
      # Verify that the expected files were copied to the remote.
      # We want to run this after each copy, i.e., when something changed,
      # so we use the asset to be copied as a trigger.
      find:
        type: command:remote:Command
        properties:
          connection: ${conn}
          create: find ${destDir}/${payload} | sort
          triggers:
            - ${archive}
        options:
          dependsOn:
            - ${copy}
    
    config:
      serverPublicIp:
        type: string
      userName:
        type: string
      privateKey:
        type: string
      payload:
        type: string
      destDir:
        type: string
    
    variables:
      # The source directory or archive to copy.
      archive:
        fn::fileArchive: ${payload}
      # The configuration of our SSH connection to the instance.
      conn:
        host: ${serverPublicIp}
        user: ${userName}
        privateKey: ${privateKey}
    
    outputs:
      remoteContents: ${find.stdout}
    

    Create CopyToRemote Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CopyToRemote(name: string, args: CopyToRemoteArgs, opts?: CustomResourceOptions);
    @overload
    def CopyToRemote(resource_name: str,
                     args: CopyToRemoteArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def CopyToRemote(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     connection: Optional[ConnectionArgs] = None,
                     remote_path: Optional[str] = None,
                     source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
                     triggers: Optional[Sequence[Any]] = None)
    func NewCopyToRemote(ctx *Context, name string, args CopyToRemoteArgs, opts ...ResourceOption) (*CopyToRemote, error)
    public CopyToRemote(string name, CopyToRemoteArgs args, CustomResourceOptions? opts = null)
    public CopyToRemote(String name, CopyToRemoteArgs args)
    public CopyToRemote(String name, CopyToRemoteArgs args, CustomResourceOptions options)
    
    type: command:remote:CopyToRemote
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CopyToRemoteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CopyToRemoteArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CopyToRemoteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CopyToRemoteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CopyToRemoteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var copyToRemoteResource = new Command.Remote.CopyToRemote("copyToRemoteResource", new()
    {
        Connection = new Command.Remote.Inputs.ConnectionArgs
        {
            Host = "string",
            AgentSocketPath = "string",
            DialErrorLimit = 0,
            Password = "string",
            PerDialTimeout = 0,
            Port = 0,
            PrivateKey = "string",
            PrivateKeyPassword = "string",
            Proxy = new Command.Remote.Inputs.ProxyConnectionArgs
            {
                Host = "string",
                AgentSocketPath = "string",
                DialErrorLimit = 0,
                Password = "string",
                PerDialTimeout = 0,
                Port = 0,
                PrivateKey = "string",
                PrivateKeyPassword = "string",
                User = "string",
            },
            User = "string",
        },
        RemotePath = "string",
        Source = new StringAsset("content"),
        Triggers = new[]
        {
            "any",
        },
    });
    
    example, err := remote.NewCopyToRemote(ctx, "copyToRemoteResource", &remote.CopyToRemoteArgs{
    	Connection: &remote.ConnectionArgs{
    		Host:               pulumi.String("string"),
    		AgentSocketPath:    pulumi.String("string"),
    		DialErrorLimit:     pulumi.Int(0),
    		Password:           pulumi.String("string"),
    		PerDialTimeout:     pulumi.Int(0),
    		Port:               pulumi.Float64(0),
    		PrivateKey:         pulumi.String("string"),
    		PrivateKeyPassword: pulumi.String("string"),
    		Proxy: &remote.ProxyConnectionArgs{
    			Host:               pulumi.String("string"),
    			AgentSocketPath:    pulumi.String("string"),
    			DialErrorLimit:     pulumi.Int(0),
    			Password:           pulumi.String("string"),
    			PerDialTimeout:     pulumi.Int(0),
    			Port:               pulumi.Float64(0),
    			PrivateKey:         pulumi.String("string"),
    			PrivateKeyPassword: pulumi.String("string"),
    			User:               pulumi.String("string"),
    		},
    		User: pulumi.String("string"),
    	},
    	RemotePath: pulumi.String("string"),
    	Source:     pulumi.NewStringAsset("content"),
    	Triggers: pulumi.Array{
    		pulumi.Any("any"),
    	},
    })
    
    var copyToRemoteResource = new CopyToRemote("copyToRemoteResource", CopyToRemoteArgs.builder()
        .connection(ConnectionArgs.builder()
            .host("string")
            .agentSocketPath("string")
            .dialErrorLimit(0)
            .password("string")
            .perDialTimeout(0)
            .port(0)
            .privateKey("string")
            .privateKeyPassword("string")
            .proxy(ProxyConnectionArgs.builder()
                .host("string")
                .agentSocketPath("string")
                .dialErrorLimit(0)
                .password("string")
                .perDialTimeout(0)
                .port(0)
                .privateKey("string")
                .privateKeyPassword("string")
                .user("string")
                .build())
            .user("string")
            .build())
        .remotePath("string")
        .source(new StringAsset("content"))
        .triggers("any")
        .build());
    
    copy_to_remote_resource = command.remote.CopyToRemote("copyToRemoteResource",
        connection=command.remote.ConnectionArgs(
            host="string",
            agent_socket_path="string",
            dial_error_limit=0,
            password="string",
            per_dial_timeout=0,
            port=0,
            private_key="string",
            private_key_password="string",
            proxy=command.remote.ProxyConnectionArgs(
                host="string",
                agent_socket_path="string",
                dial_error_limit=0,
                password="string",
                per_dial_timeout=0,
                port=0,
                private_key="string",
                private_key_password="string",
                user="string",
            ),
            user="string",
        ),
        remote_path="string",
        source=pulumi.StringAsset("content"),
        triggers=["any"])
    
    const copyToRemoteResource = new command.remote.CopyToRemote("copyToRemoteResource", {
        connection: {
            host: "string",
            agentSocketPath: "string",
            dialErrorLimit: 0,
            password: "string",
            perDialTimeout: 0,
            port: 0,
            privateKey: "string",
            privateKeyPassword: "string",
            proxy: {
                host: "string",
                agentSocketPath: "string",
                dialErrorLimit: 0,
                password: "string",
                perDialTimeout: 0,
                port: 0,
                privateKey: "string",
                privateKeyPassword: "string",
                user: "string",
            },
            user: "string",
        },
        remotePath: "string",
        source: new pulumi.asset.StringAsset("content"),
        triggers: ["any"],
    });
    
    type: command:remote:CopyToRemote
    properties:
        connection:
            agentSocketPath: string
            dialErrorLimit: 0
            host: string
            password: string
            perDialTimeout: 0
            port: 0
            privateKey: string
            privateKeyPassword: string
            proxy:
                agentSocketPath: string
                dialErrorLimit: 0
                host: string
                password: string
                perDialTimeout: 0
                port: 0
                privateKey: string
                privateKeyPassword: string
                user: string
            user: string
        remotePath: string
        source:
            fn::StringAsset: content
        triggers:
            - any
    

    CopyToRemote Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The CopyToRemote resource accepts the following input properties:

    Connection Connection
    The parameters with which to connect to the remote host.
    RemotePath string
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    Source AssetOrArchive
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    Triggers List<object>
    Trigger replacements on changes to this input.
    Connection ConnectionArgs
    The parameters with which to connect to the remote host.
    RemotePath string
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    Source pulumi.AssetOrArchive
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    Triggers []interface{}
    Trigger replacements on changes to this input.
    connection Connection
    The parameters with which to connect to the remote host.
    remotePath String
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    source AssetOrArchive
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    triggers List<Object>
    Trigger replacements on changes to this input.
    connection Connection
    The parameters with which to connect to the remote host.
    remotePath string
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    source pulumi.asset.Asset | pulumi.asset.Archive
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    triggers any[]
    Trigger replacements on changes to this input.
    connection ConnectionArgs
    The parameters with which to connect to the remote host.
    remote_path str
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    source Union[pulumi.Asset, pulumi.Archive]
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    triggers Sequence[Any]
    Trigger replacements on changes to this input.
    connection Property Map
    The parameters with which to connect to the remote host.
    remotePath String
    The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
    source Asset
    An asset or an archive to upload as the source of the copy. It must be path-based, i.e., be a FileAsset or a FileArchive. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
    triggers List<Any>
    Trigger replacements on changes to this input.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CopyToRemote resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    Connection, ConnectionArgs

    Host string
    The address of the resource to connect to.
    AgentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    DialErrorLimit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    Password string
    The password we should use for the connection.
    PerDialTimeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    Port double
    The port to connect to. Defaults to 22.
    PrivateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    PrivateKeyPassword string
    The password to use in case the private key is encrypted.
    Proxy ProxyConnection
    The connection settings for the bastion/proxy host.
    User string
    The user that we should use for the connection.
    Host string
    The address of the resource to connect to.
    AgentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    DialErrorLimit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    Password string
    The password we should use for the connection.
    PerDialTimeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    Port float64
    The port to connect to. Defaults to 22.
    PrivateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    PrivateKeyPassword string
    The password to use in case the private key is encrypted.
    Proxy ProxyConnection
    The connection settings for the bastion/proxy host.
    User string
    The user that we should use for the connection.
    host String
    The address of the resource to connect to.
    agentSocketPath String
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit Integer
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password String
    The password we should use for the connection.
    perDialTimeout Integer
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port Double
    The port to connect to. Defaults to 22.
    privateKey String
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword String
    The password to use in case the private key is encrypted.
    proxy ProxyConnection
    The connection settings for the bastion/proxy host.
    user String
    The user that we should use for the connection.
    host string
    The address of the resource to connect to.
    agentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit number
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password string
    The password we should use for the connection.
    perDialTimeout number
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port number
    The port to connect to. Defaults to 22.
    privateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword string
    The password to use in case the private key is encrypted.
    proxy ProxyConnection
    The connection settings for the bastion/proxy host.
    user string
    The user that we should use for the connection.
    host str
    The address of the resource to connect to.
    agent_socket_path str
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dial_error_limit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password str
    The password we should use for the connection.
    per_dial_timeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port float
    The port to connect to. Defaults to 22.
    private_key str
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    private_key_password str
    The password to use in case the private key is encrypted.
    proxy ProxyConnection
    The connection settings for the bastion/proxy host.
    user str
    The user that we should use for the connection.
    host String
    The address of the resource to connect to.
    agentSocketPath String
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit Number
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password String
    The password we should use for the connection.
    perDialTimeout Number
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port Number
    The port to connect to. Defaults to 22.
    privateKey String
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword String
    The password to use in case the private key is encrypted.
    proxy Property Map
    The connection settings for the bastion/proxy host.
    user String
    The user that we should use for the connection.

    ProxyConnection, ProxyConnectionArgs

    Host string
    The address of the bastion host to connect to.
    AgentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    DialErrorLimit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    Password string
    The password we should use for the connection to the bastion host.
    PerDialTimeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    Port double
    The port of the bastion host to connect to.
    PrivateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    PrivateKeyPassword string
    The password to use in case the private key is encrypted.
    User string
    The user that we should use for the connection to the bastion host.
    Host string
    The address of the bastion host to connect to.
    AgentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    DialErrorLimit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    Password string
    The password we should use for the connection to the bastion host.
    PerDialTimeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    Port float64
    The port of the bastion host to connect to.
    PrivateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    PrivateKeyPassword string
    The password to use in case the private key is encrypted.
    User string
    The user that we should use for the connection to the bastion host.
    host String
    The address of the bastion host to connect to.
    agentSocketPath String
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit Integer
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password String
    The password we should use for the connection to the bastion host.
    perDialTimeout Integer
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port Double
    The port of the bastion host to connect to.
    privateKey String
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword String
    The password to use in case the private key is encrypted.
    user String
    The user that we should use for the connection to the bastion host.
    host string
    The address of the bastion host to connect to.
    agentSocketPath string
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit number
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password string
    The password we should use for the connection to the bastion host.
    perDialTimeout number
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port number
    The port of the bastion host to connect to.
    privateKey string
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword string
    The password to use in case the private key is encrypted.
    user string
    The user that we should use for the connection to the bastion host.
    host str
    The address of the bastion host to connect to.
    agent_socket_path str
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dial_error_limit int
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password str
    The password we should use for the connection to the bastion host.
    per_dial_timeout int
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port float
    The port of the bastion host to connect to.
    private_key str
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    private_key_password str
    The password to use in case the private key is encrypted.
    user str
    The user that we should use for the connection to the bastion host.
    host String
    The address of the bastion host to connect to.
    agentSocketPath String
    SSH Agent socket path. Default to environment variable SSH_AUTH_SOCK if present.
    dialErrorLimit Number
    Max allowed errors on trying to dial the remote host. -1 set count to unlimited. Default value is 10.
    password String
    The password we should use for the connection to the bastion host.
    perDialTimeout Number
    Max number of seconds for each dial attempt. 0 implies no maximum. Default value is 15 seconds.
    port Number
    The port of the bastion host to connect to.
    privateKey String
    The contents of an SSH key to use for the connection. This takes preference over the password if provided.
    privateKeyPassword String
    The password to use in case the private key is encrypted.
    user String
    The user that we should use for the connection to the bastion host.

    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