auto_pulumi

package
v0.0.0-...-4eef74f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAPIEndpoint

func CreateAPIEndpoint(
	ctx *pulumi.Context, gateway *apigateway.RestApi, environment string,
	route APIRoute, methods []string,
) (pulumi.StringOutput, error)

func CreateNewAPIGateway

func CreateNewAPIGateway(ctx *pulumi.Context, apiName string) (*apigateway.RestApi, error)

func CreatePulumiProject

func CreatePulumiProject(ctx context.Context, owner string, projectName string, env string, description string) (string, error)

createPulumiProject creates a new Pulumi project and the appropriate stacks for each environment.

TODO: Check to see if a project exists before trying to create it. Otherwise I am guessing some pretty funky stuff will happen if the similar project names are specified.

func CreateRouteHandler

func CreateRouteHandler(ctx *pulumi.Context, route APIRoute, method string) (*lambda.Function, error)

CreateRouteHandler creates a Lambda function used for handling API Gateway requests.

func GetCurrentPulumiUser

func GetCurrentPulumiUser() (string, error)

GetCurrentPulumiUser gets the current Pulumi username.

func LogoutCurrentUser

func LogoutCurrentUser(args []string) error

LogoutCurrentUser logouts out the current user from the Pulumi CLI.

func PackageDotNetLambda

func PackageDotNetLambda(tmpDirectoryName, routeName, method string) (string, error)

PackageDotNetLambda packages a DotNet Lambda for distribution.

func PackageGoLambda

func PackageGoLambda(tmpDirectoryName, routeName, method string) (string, error)

PackageGoLambda packages a Go Lambda for distribution.

func PackageTypeScriptLambda

func PackageTypeScriptLambda(tmpDirectoryName string, routeName, method string) (string, error)

PackageTypeScriptLambda packages a TypeScript Lambda for distribution.

func PromptForPulumiAccessToken

func PromptForPulumiAccessToken() error

Types

type APIEndpoint

type APIEndpoint struct {
	Name string
	URL  pulumi.StringOutput
}

func CreateAPI

func CreateAPI(ctx *pulumi.Context, projectName, environment string, routes []APIRoute) ([]APIEndpoint, error)

type APIEndpointFunction

type APIEndpointFunction struct {
	Function *lambda.Function
	Method   string
}

type APIRoute

type APIRoute struct {
	Name        string
	Route       string
	PathToFiles string
	CorsEnabled bool
}

APIRoute represents and API Route in the config.

type PulumiAction

type PulumiAction struct {
	CreateDeployment   func(environment string) (auto.Stack, error)
	Environment        string
	Stack              auto.Stack
	TemporaryDirectory *utils.TemporaryDirectory
}

func (*PulumiAction) Destroy

func (a *PulumiAction) Destroy(ctx context.Context) error

Destroy runs a destroy of the infrastructure.

func (*PulumiAction) Fail

func (a *PulumiAction) Fail(err error, message string) error

Fail handles the failure operations like cleaning the tmp dir.

func (*PulumiAction) Preview

func (a *PulumiAction) Preview(ctx context.Context) error

Preview runs a preview of the infrastructure changes.

func (*PulumiAction) SetUp

func (a *PulumiAction) SetUp(ctx context.Context, configPath string) error

SetUp sets up the action to run.

func (*PulumiAction) Update

func (a *PulumiAction) Update(ctx context.Context) error

Update runs an update of the infrastructure.

type PulumiActionOutputLogger

type PulumiActionOutputLogger struct {
	Headers              []string
	Rows                 map[string]PulumiActionResourceOutput
	NewRowsAdded         int
	TableWriteInProgress bool
	FirstPrintDone       bool
}

func (*PulumiActionOutputLogger) AddRow

func (p *PulumiActionOutputLogger) AddRow(msg string)

func (*PulumiActionOutputLogger) Write

func (p *PulumiActionOutputLogger) Write(msg []byte) (int, error)

func (*PulumiActionOutputLogger) WriteTable

func (p *PulumiActionOutputLogger) WriteTable()

type PulumiActionResourceOutput

type PulumiActionResourceOutput struct {
	Parts []string
	Order int
}

Jump to

Keyboard shortcuts

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