Help us shape the future of Go! Take the 2026 Go Developer Survey

compact

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Quiet bool

Quiet suppresses progress messages when true.

Functions

func Run

func Run(outputDir string, opts *Options) error

Run scans all .tf files in the output directory and consolidates eligible resource types into for_each + locals patterns.

Types

type Options

type Options struct {
	// Include, if non-empty, restricts compaction to only these types.
	// Matched against the output filename stem (e.g. "categories", "buildings").
	Include map[string]bool

	// Exclude excludes these types from compaction, even if they appear eligible.
	// Matched against the output filename stem.
	Exclude map[string]bool
}

Options controls which resource types are compacted.

Jump to

Keyboard shortcuts

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