statemoves

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package statemoves loads the optional --state-moves manifest: per stack, the addresses being moved IN by an external cross-state move (infra's state-mover). A planned create of such an address is a relocation, not a real create, so classification treats it as non-mutating.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest

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

func Load

func Load(path string) (Manifest, error)

Load reads the JSON manifest; an empty path returns an empty manifest (fail-safe).

func (Manifest) Targets

func (m Manifest) Targets(stack string) Set

Targets returns the move-target set for a stack (empty, never nil, if none).

type Set

type Set map[string]bool

func (Set) Covers added in v0.5.8

func (s Set) Covers(addr string) bool

Covers reports whether addr is a pending move-target — either an exact match, or a resource nested under a moved module/resource target (a "target." prefix). A whole-module move (target "module.x") thus covers every planned child it produces ("module.x.google_project_iam_member.y", …), which is the granularity terraform plans actually surface (there is no bare "module.x" change). The "." boundary keeps "module.x" from matching a sibling "module.x_other".

func (Set) Len

func (s Set) Len() int

Jump to

Keyboard shortcuts

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