cloud

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PulumiCloudURL is the Cloud URL used if no environment or explicit cloud is chosen.
	PulumiCloudURL = "https://" + defaultAPIDomainPrefix + "pulumi.com"

	// AccessTokenEnvVar is the environment variable used to bypass a prompt on login.
	AccessTokenEnvVar = "PULUMI_ACCESS_TOKEN"
)

Variables

This section is empty.

Functions

func DefaultURL

func DefaultURL() string

DefaultURL returns the default cloud URL. This may be overridden using the PULUMI_API environment variable. If no override is found, and we are authenticated with a cloud, choose that. Otherwise, we will default to the https://api.pulumi.com/ endpoint.

func IsValidAccessToken

func IsValidAccessToken(ctx context.Context, cloudURL, accessToken string) (bool, error)

IsValidAccessToken tries to use the provided Pulumi access token and returns if it is accepted or not. Returns error on any unexpected error.

func ValueOrDefaultURL

func ValueOrDefaultURL(cloudURL string) string

ValueOrDefaultURL returns the value if specified, or the default cloud URL otherwise.

Types

type Backend

type Backend interface {
	backend.Backend

	CloudURL() string

	DownloadPlugin(
		ctx context.Context, info workspace.PluginInfo,
		progress bool, opts backend.DisplayOptions) (io.ReadCloser, error)

	CancelCurrentUpdate(ctx context.Context, stackRef backend.StackReference) error
	StackConsoleURL(stackRef backend.StackReference) (string, error)
}

Backend extends the base backend interface with specific information about cloud backends.

func Login

func Login(ctx context.Context, d diag.Sink, cloudURL string, opts backend.DisplayOptions) (Backend, error)

Login logs into the target cloud URL and returns the cloud backend for it.

func New

func New(d diag.Sink, cloudURL string) (Backend, error)

New creates a new Pulumi backend for the given cloud API URL and token.

type CreateStackOptions

type CreateStackOptions struct {
	// CloudName is the optional PPC name to create the stack in.  If omitted, the organization's default PPC is used.
	CloudName string
}

CreateStackOptions is an optional bag of options specific to creating cloud stacks.

type DisplayEventType

type DisplayEventType string
const (
	UpdateEvent   DisplayEventType = "UpdateEvent"
	ShutdownEvent DisplayEventType = "Shutdown"
)

type Stack

type Stack interface {
	backend.Stack
	CloudURL() string            // the URL to the cloud containing this stack.
	OrgName() string             // the organization that owns this stack.
	ConsoleURL() (string, error) // the URL to view the stack's information on Pulumi.com
}

Stack is a cloud stack. This simply adds some cloud-specific properties atop the standard backend stack interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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