command

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// remoteCommandTimeout int = 300
	// https://www.pulumi.com/docs/intro/concepts/resources/options/customtimeouts/
	RemoteTimeout string = "40m"

	// CommandCloudInitWait waits until cloud-init finishes.
	//
	// The command accepts exit code 0 and exit code 2 (recoverable error).
	// When cloud-init reports a fatal error, the command prints the cloud-init
	// report and the last lines of /var/log/cloud-init-output.log. The log holds
	// the output of the user data commands. Without this output, the operator
	// cannot find the command that failed.
	// https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2048522
	CommandCloudInitWait string = `sudo cloud-init status --long --wait; rc=$?; ` +
		`if [ "$rc" -eq 0 ] || [ "$rc" -eq 2 ]; then exit 0; fi; ` +
		`echo "=== cloud-init failure (exit code ${rc}) ==="; ` +
		`sudo cloud-init status --long || true; ` +
		`echo "=== /var/log/cloud-init-output.log (last 200 lines) ==="; ` +
		`sudo tail -n 200 /var/log/cloud-init-output.log || true; ` +
		`exit "$rc"`
	CommandPing string = "echo ping"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteCommand

type RemoteCommand func(ctx *pulumi.Context, remoteCommand, remoteCommandName string) error

Remote command success if error = nil

type RemoteInstance

type RemoteInstance struct {
	InstanceIP *pulumi.StringOutput
	Instance   *ec2.Instance
	Username   string
	PrivateKey *tls.PrivateKey
}

func (RemoteInstance) RemoteExec

func (r RemoteInstance) RemoteExec(ctx *pulumi.Context, remoteCommand pulumi.StringPtrInput, remoteCommandName string,
	dependecies []pulumi.Resource) (*remote.Command, error)

Jump to

Keyboard shortcuts

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