aws_cf

package
v0.0.0-...-b7f47fd Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyTemplate

func EmptyTemplate() string

func IsNoUpdatesError

func IsNoUpdatesError(err error) bool

func ResolveFunc

func ResolveFunc(raw any, params map[string]string) (string, error)

Types

type CFClient

type CFClient struct {
	// contains filtered or unexported fields
}

func NewCFAdapter

func NewCFAdapter(clients *awsapi.DeployerClients) *CFClient

func (*CFClient) CancelStackUpdate

func (cf *CFClient) CancelStackUpdate(ctx context.Context, reqToken string, msg *awsinfra_tpb.CancelStackUpdateMessage) error

func (*CFClient) CreateChangeSet

func (cf *CFClient) CreateChangeSet(ctx context.Context, reqToken string, msg *awsinfra_tpb.CreateChangeSetMessage) error

func (*CFClient) CreateNewStack

func (cf *CFClient) CreateNewStack(ctx context.Context, reqToken string, msg *awsinfra_tpb.CreateNewStackMessage) error

func (*CFClient) DeleteStack

func (cf *CFClient) DeleteStack(ctx context.Context, reqToken string, stackName string) error

func (*CFClient) GetChangeSet

func (cf *CFClient) GetChangeSet(ctx context.Context, stackName, changeSetName string) (*ChangeSetStatus, error)

func (*CFClient) GetOneStack

func (cf *CFClient) GetOneStack(ctx context.Context, stackName string) (*StackStatus, error)

func (*CFClient) ImportResources

func (cf *CFClient) ImportResources(ctx context.Context, templateBody string, params []types.Parameter) (*ImportOutput, error)

func (*CFClient) Logs

func (cf *CFClient) Logs(ctx context.Context, stackName string) ([]LogEvent, error)

func (*CFClient) ScaleStack

func (cf *CFClient) ScaleStack(ctx context.Context, reqToken string, msg *awsinfra_tpb.ScaleStackMessage) error

func (*CFClient) UpdateStack

func (cf *CFClient) UpdateStack(ctx context.Context, reqToken string, msg *awsinfra_tpb.UpdateStackMessage) error

type ChangeSetStatus

type ChangeSetStatus struct {
	Status    string
	Lifecycle awsdeployer_pb.CFChangesetLifecycle
}

type DeferredParameterResolver

type DeferredParameterResolver struct {
	// contains filtered or unexported fields
}

func NewDeferredParameterResolver

func NewDeferredParameterResolver(elbClient awsapi.ELBV2API, listenerARN string, desiredCount int32) (*DeferredParameterResolver, error)

func (*DeferredParameterResolver) Resolve

type FuncJoin

type FuncJoin struct {
	Join   string
	Values []any
}

func (*FuncJoin) MarshalJSON

func (f *FuncJoin) MarshalJSON() ([]byte, error)

func (*FuncJoin) UnmarshalJSON

func (f *FuncJoin) UnmarshalJSON(data []byte) error

type ImportOutput

type ImportOutput struct {
	Imports     []types.ResourceToImport
	NewTemplate string
}

type InfraWorker

type InfraWorker struct {
	awsinfra_tpb.UnimplementedCloudFormationRequestTopicServer

	*CFClient
	// contains filtered or unexported fields
}

func NewInfraWorker

func NewInfraWorker(db tokenstore.DBLite, adapter *CFClient) *InfraWorker

func (*InfraWorker) CancelStackUpdate

func (cf *InfraWorker) CancelStackUpdate(ctx context.Context, msg *awsinfra_tpb.CancelStackUpdateMessage) (*emptypb.Empty, error)

func (*InfraWorker) CreateChangeSet

func (cf *InfraWorker) CreateChangeSet(ctx context.Context, msg *awsinfra_tpb.CreateChangeSetMessage) (*emptypb.Empty, error)

func (*InfraWorker) CreateNewStack

func (cf *InfraWorker) CreateNewStack(ctx context.Context, msg *awsinfra_tpb.CreateNewStackMessage) (*emptypb.Empty, error)

func (*InfraWorker) HandleStackStatusChangeEvent

func (cf *InfraWorker) HandleStackStatusChangeEvent(ctx context.Context, eventID string, event *StackStatusChangeEvent) error

func (*InfraWorker) ScaleStack

func (*InfraWorker) StabalizeStack

func (cf *InfraWorker) StabalizeStack(ctx context.Context, msg *awsinfra_tpb.StabalizeStackMessage) (*emptypb.Empty, error)

StabalizeStack is sent to check that the stack is ready for a new deployment. It will emit a 'fake' status change event if the stack is in a stable state, so that the deployer can catch up with remote status.

func (*InfraWorker) UpdateStack

type LogEvent

type LogEvent struct {
	Timestamp time.Time
	Resource  string
	Status    string
	Detail    string
	IsFailure bool
}

type Resource

type Resource struct {
	Type           string         `json:"Type"`
	DeletionPolicy string         `json:"DeletionPolicy,omitempty"`
	Properties     map[string]any `json:"Properties,omitempty"`
}

type StackArgs

type StackArgs struct {
	Template   *awsdeployer_pb.DeploymentState
	Parameters []types.Parameter
}

type StackStatus

type StackStatus struct {
	StackStatus types.StackStatus
	SummaryType awsdeployer_pb.CFLifecycle
	IsOK        bool
	Stable      bool
	Parameters  []*awsdeployer_pb.KeyValue
	Outputs     []*awsdeployer_pb.KeyValue
}

type StackStatusChangeEvent

type StackStatusChangeEvent struct {
	StackID            string                               `json:"stack-id"`
	ClientRequestToken string                               `json:"client-request-token"`
	StatusDetails      StackStatusChangeEvent_StatusDetails `json:"status-details"`
}

type StackStatusChangeEvent_StatusDetails

type StackStatusChangeEvent_StatusDetails struct {
	Status         string `json:"status"`
	DetailedStatus string `json:"detailed-status"`
}

type Template

type Template struct {
	AWSTemplateFormatVersion string              `json:"AWSTemplateFormatVersion"`
	Resources                map[string]Resource `json:"Resources"`
	Parameters               map[string]any      `json:"Parameters"`
	Outputs                  map[string]any      `json:"Outputs,omitempty"`
}

Jump to

Keyboard shortcuts

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