stages

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerraformOutputs

func GetTerraformOutputs(s SplitStage, directory string) (map[string]interface{}, error)

GetTerraformOutputs reads the terraform outputs file for the stage and parses it into a map of outputs.

Types

type DestroyFunc

type DestroyFunc func(s SplitStage, directory string, terraformDir string, varFiles []string) error

DestroyFunc is a function for destroying the stage.

type ExtractFunc

type ExtractFunc func(s SplitStage, directory string, ic *types.InstallConfig) (string, int, []string, error)

ExtractFunc is a function for extracting host addresses.

type SplitStage

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

SplitStage is a split stage.

func NewStage

func NewStage(platform, name string, providers []providers.Provider, opts ...StageOption) SplitStage

NewStage creates a new split stage. The default behavior is the following. The behavior can be changed by providing StageOptions.

  • The resources of the stage will not be deleted as part of destroying the bootstrap.
  • The IP addresses for the bootstrap and control plane VMs will be output from the stage as bootstrap_ip and control_plane_ips, respectively. Only one stage for the platform should output a particular variable. This will likely be the same stage that creates the VM.

func (SplitStage) Destroy

func (s SplitStage) Destroy(directory string, terraformDir string, varFiles []string) error

Destroy implements pkg/terraform/Stage.Destroy

func (SplitStage) DestroyWithBootstrap

func (s SplitStage) DestroyWithBootstrap() bool

DestroyWithBootstrap implements pkg/terraform/Stage.DestroyWithBootstrap

func (SplitStage) ExtractHostAddresses

func (s SplitStage) ExtractHostAddresses(directory string, ic *types.InstallConfig) (string, int, []string, error)

ExtractHostAddresses implements pkg/terraform/Stage.ExtractHostAddresses

func (SplitStage) Name

func (s SplitStage) Name() string

Name implements pkg/terraform/Stage.Name

func (SplitStage) OutputsFilename

func (s SplitStage) OutputsFilename() string

OutputsFilename implements pkg/terraform/Stage.OutputsFilename

func (SplitStage) Providers

func (s SplitStage) Providers() []providers.Provider

Providers is the list of providers that are used for the stage.

func (SplitStage) StateFilename

func (s SplitStage) StateFilename() string

StateFilename implements pkg/terraform/Stage.StateFilename

type StageOption

type StageOption func(*SplitStage)

StageOption is an option for configuring a split stage.

func WithCustomBootstrapDestroy

func WithCustomBootstrapDestroy(destroy DestroyFunc) StageOption

WithCustomBootstrapDestroy returns an option for specifying that a split stage should use a custom bootstrap destroy process.

func WithCustomExtractHostAddresses

func WithCustomExtractHostAddresses(extractHostAddresses ExtractFunc) StageOption

WithCustomExtractHostAddresses returns an option for specifying that a split stage should use a custom extract host addresses process.

func WithNormalBootstrapDestroy

func WithNormalBootstrapDestroy() StageOption

WithNormalBootstrapDestroy returns an option for specifying that a split stage should use the normal bootstrap destroy process. The normal process is to fully delete all of the resources created in the stage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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