plandir

package
v0.44.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package plandir discovers per-stack Terraform plan JSON files under a single directory. Each `tfplan.json` found defines one stack; the stack's name is the directory containing it, relative to the scanned root (forward-slash form).

Index

Constants

View Source
const PlanFile = "tfplan.json"

PlanFile is the fixed filename Scan looks for in each stack directory. It matches Terragrunt's `--json-out-dir` output; Terramate is scripted to write the same name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack struct {
	Name string // dir containing the plan, relative to the scan root (forward-slash)
	Plan string // filesystem path to the tfplan.json
}

Stack is one discovered stack: its name and the path to its plan JSON.

func Scan

func Scan(dir string) ([]Stack, error)

Scan walks dir and returns one Stack per tfplan.json found, sorted lexicographically by Name. A nonexistent dir is an error; an existing dir with no plan files returns an empty slice and no error. Each plan must live in a subdirectory of dir; a plan file at the scan root is an error.

Jump to

Keyboard shortcuts

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