Documentation ¶
Index ¶
- Constants
- Variables
- func CheckBaseInfrastructurePipeline(r *Runner, name string) (int, error)
- func CheckPipeline(r *Runner, name string) (int, error)
- func DestroyPipeline(r *Runner, name string) error
- type CMDExecutor
- type ChangeActionSettings
- type DummyHook
- type Executor
- type InfraActionHook
- type PipelineOutputs
- type Runner
- func (r *Runner) Apply() error
- func (r *Runner) Destroy() error
- func (r *Runner) GetTerraformOutput(output string) ([]byte, error)
- func (r *Runner) Init() error
- func (r *Runner) Plan() error
- func (r *Runner) ResourcesQuantityInState() int
- func (r *Runner) Stop()
- func (r *Runner) WithAdditionalStateSaverDestination(destinations ...SaverDestination) *Runner
- func (r *Runner) WithAllowedCachedState(flag bool) *Runner
- func (r *Runner) WithAutoApprove(flag bool) *Runner
- func (r *Runner) WithAutoDismissDestructiveChanges(flag bool) *Runner
- func (r *Runner) WithCache(cache state.Cache) *Runner
- func (r *Runner) WithConfirm(confirm func() *input.Confirmation) *Runner
- func (r *Runner) WithHook(h InfraActionHook) *Runner
- func (r *Runner) WithName(name string) *Runner
- func (r *Runner) WithSkipChangesOnDeny(flag bool) *Runner
- func (r *Runner) WithState(stateData []byte) *Runner
- func (r *Runner) WithStatePath(statePath string) *Runner
- func (r *Runner) WithVariables(variablesData []byte) *Runner
- type SaverDestination
- type StateSaver
Constants ¶
View Source
const ( PlanHasNoChanges = iota PlanHasChanges PlanHasDestructiveChanges )
Variables ¶
View Source
var ( ErrRunnerStopped = errors.New("Terraform runner was stopped.") ErrTerraformApplyAborted = errors.New("Terraform apply aborted.") )
Functions ¶
func DestroyPipeline ¶
Types ¶
type CMDExecutor ¶
type CMDExecutor struct {
// contains filtered or unexported fields
}
CMDExecutor straightforward cmd executor which provides convenient output and handles quit signal.
func (*CMDExecutor) Stop ¶
func (c *CMDExecutor) Stop()
type ChangeActionSettings ¶
type DummyHook ¶
type DummyHook struct{}
func (*DummyHook) AfterAction ¶
func (*DummyHook) BeforeAction ¶
type InfraActionHook ¶
type PipelineOutputs ¶
type PipelineOutputs struct { TerraformState []byte CloudDiscovery []byte BastionHost string MasterIPForSSH string NodeInternalIP string KubeDataDevicePath string }
func ApplyPipeline ¶
func ApplyPipeline(r *Runner, name string, extractFn func(r *Runner) (*PipelineOutputs, error)) (*PipelineOutputs, error)
func GetBaseInfraResult ¶
func GetBaseInfraResult(r *Runner) (*PipelineOutputs, error)
func GetMasterNodeResult ¶
func GetMasterNodeResult(r *Runner) (*PipelineOutputs, error)
func OnlyState ¶
func OnlyState(r *Runner) (*PipelineOutputs, error)
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewImmutableRunnerFromConfig ¶
func NewImmutableRunnerFromConfig(cfg *config.MetaConfig, step string) *Runner
func NewRunnerFromConfig ¶
func (*Runner) GetTerraformOutput ¶
func (*Runner) ResourcesQuantityInState ¶
func (*Runner) Stop ¶
func (r *Runner) Stop()
Stop interrupts the current runner command and sets a flag to prevent executions of next runner commands.
func (*Runner) WithAdditionalStateSaverDestination ¶
func (r *Runner) WithAdditionalStateSaverDestination(destinations ...SaverDestination) *Runner
WithAdditionalStateSaverDestination by default we use intermediate save state to cache destination
func (*Runner) WithAllowedCachedState ¶
func (*Runner) WithAutoApprove ¶
func (*Runner) WithAutoDismissDestructiveChanges ¶
func (*Runner) WithConfirm ¶
func (r *Runner) WithConfirm(confirm func() *input.Confirmation) *Runner
func (*Runner) WithHook ¶
func (r *Runner) WithHook(h InfraActionHook) *Runner
func (*Runner) WithSkipChangesOnDeny ¶
func (*Runner) WithStatePath ¶
func (*Runner) WithVariables ¶
type SaverDestination ¶
type SaverDestination interface {
SaveState(outputs *PipelineOutputs) error
}
type StateSaver ¶
type StateSaver struct {
// contains filtered or unexported fields
}
func NewStateSaver ¶
func NewStateSaver(destinations []SaverDestination) *StateSaver
func (*StateSaver) DoneCh ¶
func (s *StateSaver) DoneCh() chan struct{}
func (*StateSaver) FsEventHandler ¶
func (s *StateSaver) FsEventHandler(event fsnotify.Event)
func (*StateSaver) IsStarted ¶
func (s *StateSaver) IsStarted() bool
func (*StateSaver) Start ¶
func (s *StateSaver) Start(runner *Runner) error
Start creates a new file watcher for r.statePath and a chan to stop it.
Click to show internal directories.
Click to hide internal directories.