plan

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApplyTask

func IsApplyTask(t *task.Task) bool

Types

type Change

type Change struct {
	Actions []ChangeAction
}

Change represents the type of change being made

type ChangeAction

type ChangeAction string
const (
	CreateAction ChangeAction = "create"
	UpdateAction ChangeAction = "update"
	DeleteAction ChangeAction = "delete"
)

type CreateOptions

type CreateOptions struct {
	// TargetAddrs creates a plan targeting specific resources.
	TargetAddrs []state.ResourceAddress
	// Destroy creates a plan to destroy all resources.
	Destroy bool
	// contains filtered or unexported fields
}

type Report

type Report struct {
	Additions    int `json:"additions"`
	Changes      int `json:"changes"`
	Destructions int `json:"destructions"`
}

Report reports a summary of additions, changes, and deletions of resources in a plan or an apply.

func (Report) HasChanges

func (r Report) HasChanges() bool

func (Report) String

func (r Report) String() string

type ResourceChange

type ResourceChange struct {
	Change Change
}

ResourceChange represents a proposed change to a resource in a plan file

type Service

type Service struct {
	*pubsub.Broker[*plan]
	// contains filtered or unexported fields
}

func NewService

func NewService(opts ServiceOptions) *Service

func (*Service) Apply

func (s *Service) Apply(workspaceID resource.ID, opts CreateOptions) (task.Spec, error)

Apply creates a task spec to auto-apply a plan, i.e. `terraform apply`. To apply an existing plan, see ApplyPlan.

func (*Service) ApplyPlan

func (s *Service) ApplyPlan(taskID resource.ID) (task.Spec, error)

ApplyPlan creates a task spec to apply an existing plan, i.e. `terraform apply existing.plan`. The taskID is the ID of a plan task, which must have finished successfully.

func (*Service) Get

func (s *Service) Get(runID resource.ID) (*plan, error)

func (*Service) List

func (s *Service) List() []*plan

func (*Service) Plan

func (s *Service) Plan(workspaceID resource.ID, opts CreateOptions) (task.Spec, error)

Plan creates a task spec to create a plan, i.e. `terraform plan -out plan.file`.

func (*Service) ReloadAfterApply

func (s *Service) ReloadAfterApply(sub <-chan resource.Event[*task.Task])

ReloadAfterApply creates a state reload task whenever an apply task successfully finishes.

type ServiceOptions

type ServiceOptions struct {
	Tasks      *task.Service
	Modules    *module.Service
	Workspaces *workspace.Service
	States     *state.Service
	DataDir    string
	Workdir    internal.Workdir
	Logger     logging.Interface
	Terragrunt bool
}

Jump to

Keyboard shortcuts

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