plan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package plan parses a Terraform plan JSON document into a RawStack: reduced action counts plus, for update/replace changes, the set of changed attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RawAttr

type RawAttr struct {
	Name      string
	Before    any
	After     any
	Sensitive bool
	Unknown   bool // known after apply
}

RawAttr is one changed attribute, pre-rendering.

type RawChange

type RawChange struct {
	Address string
	Type    string
	Actions []string // raw tf actions, e.g. ["update"] or ["delete","create"]
	Action  model.Action
	Attrs   []RawAttr // populated for update/replace only
}

RawChange is one resource change with its raw Terraform actions retained (classify needs them) alongside the reduced bucket.

type RawStack

type RawStack struct {
	Name    string
	Counts  model.Counts
	Changes []RawChange
}

RawStack is a parsed plan for one stack (no-ops excluded).

func Parse

func Parse(name string, data []byte) (RawStack, error)

Parse reads a `terraform show -json` plan document.

Jump to

Keyboard shortcuts

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