plan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package plan parses a `terraform show -json` plan into grouped resource actions.

Index

Constants

This section is empty.

Variables

Order is the display order for actions.

Functions

This section is empty.

Types

type Action

type Action string

Action is the effective change kind for a resource.

const (
	Create  Action = "create"
	Update  Action = "update"
	Replace Action = "replace"
	Destroy Action = "destroy"
	NoOp    Action = "no-op"
	Read    Action = "read"
)

type ResourceChange

type ResourceChange struct {
	Address string
	Type    string
	Action  Action
}

ResourceChange is one planned change.

type Summary

type Summary struct {
	Changes []ResourceChange
	Counts  map[Action]int
}

Summary is the parsed plan grouped by action.

func Parse

func Parse(data []byte) (Summary, error)

Parse reads plan JSON produced by `terraform show -json plan.bin`.

func (Summary) HasRisk

func (s Summary) HasRisk() bool

HasRisk reports whether the plan destroys or replaces anything.

func (Summary) Total

func (s Summary) Total() int

Total counts the changes that actually modify infrastructure (excludes no-op and read).

Jump to

Keyboard shortcuts

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