remote

package
v0.84.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitHost

func InitHost(e config.Env, conn remote.ConnectionOutput, osDesc os.Descriptor, osUser string, password pulumi.StringOutput, readyFunc command.ReadyFunc, host *Host) error

InitHost initializes all fields of a Host component with the given connection and OS descriptor.

func NewConnection

func NewConnection(host pulumi.StringInput, user string, options ...ConnectionOption) (*remote.ConnectionArgs, error)

NewConnection creates a remote connection to a host. Host and user are mandatory.

Types

type ConnectionOption

type ConnectionOption = func(*connectionArgs) error

func WithDialErrorLimit

func WithDialErrorLimit(limit int) ConnectionOption

WithDialErrorLimit [optional] sets the maximum dial attempts for the connection. Defaults to 100.

func WithPerDialTimeoutSeconds

func WithPerDialTimeoutSeconds(seconds int) ConnectionOption

WithPerDialTimeoutSeconds [optional] sets the per dial timeout in seconds for the connection. Defaults to 5.

func WithPort

func WithPort(port int) ConnectionOption

WithPort [optional] sets the port to use for the connection. Default to 22.

func WithPrivateKeyPassword

func WithPrivateKeyPassword(password string) ConnectionOption

WithPrivateKeyPassword [optional] sets the password to use in case the private key is encrypted

func WithPrivateKeyPath

func WithPrivateKeyPath(path string) ConnectionOption

WithPrivateKeyPath [optional] sets the path to the private key to use for the connection

func WithSSHAgentPath

func WithSSHAgentPath(path string) ConnectionOption

WithSSHAgentPath [optional] sets the path to the SSH Agent socket. Default to environment variable SSH_AUTH_SOCK if present.

type Host

type Host struct {
	pulumi.ResourceState
	components.Component

	OS os.OS

	Address       pulumi.StringOutput `pulumi:"address"`
	Port          pulumi.IntOutput    `pulumi:"port"`
	Username      pulumi.StringOutput `pulumi:"username"`
	Password      pulumi.StringOutput `pulumi:"password"`
	Architecture  pulumi.StringOutput `pulumi:"architecture"`
	OSFamily      pulumi.IntOutput    `pulumi:"osFamily"`
	OSFlavor      pulumi.IntOutput    `pulumi:"osFlavor"`
	OSVersion     pulumi.StringOutput `pulumi:"osVersion"`
	CloudProvider pulumi.StringOutput `pulumi:"cloudProvider"`

	PoolInstanceID      pulumi.StringOutput `pulumi:"poolInstanceId"`
	PoolLeaseToken      pulumi.StringOutput `pulumi:"poolLeaseToken"`
	PoolRegion          pulumi.StringOutput `pulumi:"poolRegion"`
	PoolProfile         pulumi.StringOutput `pulumi:"poolProfile"`
	PoolLeaseBucket     pulumi.StringOutput `pulumi:"poolLeaseBucket"`
	PoolBaselineImageID pulumi.StringOutput `pulumi:"poolBaselineImageId"`
	PoolStackID         pulumi.StringOutput `pulumi:"poolStackId"`
}

Host represents a remote host (for instance, a VM)

func (*Host) Export

func (h *Host) Export(ctx *pulumi.Context, out *HostOutput) error

type HostOutput

type HostOutput struct {
	components.JSONImporter

	CloudProvider components.CloudProviderIdentifier `json:"cloudProvider"`

	Address      string          `json:"address"`
	Port         int             `json:"port"`
	Username     string          `json:"username"`
	Password     string          `json:"password,omitempty"`
	OSFamily     os.Family       `json:"osFamily"`
	OSFlavor     os.Flavor       `json:"osFlavor"`
	OSVersion    string          `json:"osVersion"`
	Architecture os.Architecture `json:"architecture"`

	// Pool* are set only when the host is a macOS EC2 pool member (see
	// resources/aws/ec2/pool). BaseSuite reads them at teardown to revert and release
	// the instance. An empty PoolLeaseToken with a set PoolInstanceID means the member
	// was just created and still needs its first lease published.
	PoolInstanceID      string `json:"poolInstanceId,omitempty"`
	PoolLeaseToken      string `json:"poolLeaseToken,omitempty"`
	PoolRegion          string `json:"poolRegion,omitempty"`
	PoolProfile         string `json:"poolProfile,omitempty"`
	PoolLeaseBucket     string `json:"poolLeaseBucket,omitempty"`
	PoolBaselineImageID string `json:"poolBaselineImageId,omitempty"`
	PoolStackID         string `json:"poolStackId,omitempty"`
}

HostOutput is the type that is used to import the Host component

Jump to

Keyboard shortcuts

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