terraform

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Changes

type Changes struct {
	Added   int `json:"added"`
	Updated int `json:"updated"`
	Deleted int `json:"deleted"`
}

func (Changes) HasAny

func (c Changes) HasAny() bool

func (Changes) Highest

func (c Changes) Highest() string

type JSonPlanSummary

type JSonPlanSummary struct {
	*tfjson.Plan
	// contains filtered or unexported fields
}

JSonPlanSummary is a summary based on the actual terraform plan

func (*JSonPlanSummary) ChangedResources

func (j *JSonPlanSummary) ChangedResources() string

func (*JSonPlanSummary) Changes

func (j *JSonPlanSummary) Changes() Changes

func (*JSonPlanSummary) Children

func (j *JSonPlanSummary) Children() []PlanSummary

func (*JSonPlanSummary) Name

func (j *JSonPlanSummary) Name() string

func (*JSonPlanSummary) UpToDate

func (j *JSonPlanSummary) UpToDate() bool

type PlanDir

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

func ReadDir

func ReadDir(dir string) (*PlanDir, error)

func (*PlanDir) ChangedResources

func (p *PlanDir) ChangedResources() string

func (*PlanDir) Changes

func (p *PlanDir) Changes() Changes

func (*PlanDir) Children

func (p *PlanDir) Children() []PlanSummary

func (*PlanDir) Name

func (p *PlanDir) Name() string

func (*PlanDir) UpToDate

func (p *PlanDir) UpToDate() bool

type PlanSummary

type PlanSummary interface {
	// Name is the name of the grouping (environment, plane, whatever)
	Name() string
	// Changes calculates the number of additions, changes, and deletions
	Changes() Changes
	UpToDate() bool
	Children() []PlanSummary
	ChangedResources() string
}

func ReadPlan

func ReadPlan(file string) (PlanSummary, error)

type SummaryData

type SummaryData struct {
	Name             string        `json:"name"`
	Changes          Changes       `json:"changes"`
	Children         []PlanSummary `json:"children,omitempty" `
	ChangedResources string        `json:"changed-resources,omitempty"`
}

type Workspace

type Workspace string

Jump to

Keyboard shortcuts

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