Documentation
¶
Overview ¶
Package config loads and validates the HCL policy file (.tfstackplan.hcl), resolving classification presets+rules into a single ordered rule list while preserving source declaration order.
Index ¶
Constants ¶
const DefaultFilename = ".tfstackplan.hcl"
DefaultFilename is auto-discovered in the working directory.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Classification ¶
Classification holds the resolved, ordered rules and the fallback class.
type Config ¶
type Config struct {
Classification *Classification // nil when no classification block present
Diff DiffConfig
Links *LinksConfig // nil when no links block present
}
Config is the parsed policy file.
type DiffConfig ¶
type DiffConfig struct {
Detect bool
MaxAttributeLines int // 0 = no cap
Overrides []DiffOverride
}
DiffConfig holds diff defaults and per-attribute overrides.
func (DiffConfig) Resolve ¶
func (d DiffConfig) Resolve(resourceType, attr string) string
Resolve returns the differ kind ("" = auto) for a resource type + attribute.
type DiffOverride ¶
DiffOverride forces a differ for a (resource type, attribute) pair.
type HeaderLink ¶ added in v0.3.0
HeaderLink is one templated report-header link.
type LinksConfig ¶ added in v0.3.0
type LinksConfig struct {
Resource string
Stack string
Header []HeaderLink
}
LinksConfig holds URL templates for header / stack / resource links.