terraform

package
v0.19.1069 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package terraform holds tool-layer CompositeError parsers for terraform jobs. They register at errparse.LayerTool so a provider-specific cause (e.g. an AWS IAM denial parsed at LayerProvider) still wins, but any other terraform diagnostic yields a clean, structured error instead of falling through to the raw generic dump. This is the first tool-layer parser; more specific terraform causes (state lock, backend init, ...) can register alongside it.

Index

Constants

View Source
const TerraformErrorType compositeerrors.Type = "terraform.error"

TerraformErrorType is the discriminator for a terraform diagnostic that no provider-layer parser recognised.

View Source
const TerraformStateLockType compositeerrors.Type = "terraform.state_lock"

TerraformStateLockType is the discriminator for a terraform run that could not acquire the state lock. It is split out of the generic terraform.error so the dashboard can surface targeted remediation (force-unlock) and so the orchestrator parks the step instead of burning retries: Nuon serialises operations per install/sandbox, so a lock is almost always stale (left by a crashed or cancelled run) rather than a run genuinely in progress, and a blind retry can never clear it.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateLockError added in v0.19.1054

type StateLockError struct {
	Output string `json:"output,omitempty"`
	// contains filtered or unexported fields
}

StateLockError is the payload for a terraform state-lock failure. The detailed lock info (ID, who, path) is emitted to the log stream, not the captured error output, so it is not available here; Output carries whatever context was captured. target ("sandbox"/"component"/"") tailors the force-unlock command in the remediation.

func (*StateLockError) Error added in v0.19.1054

func (e *StateLockError) Error() string

func (*StateLockError) Hints added in v0.19.1054

func (*StateLockError) Sections added in v0.19.1054

func (e *StateLockError) Sections() []compositeerrors.Section

func (*StateLockError) Severity added in v0.19.1054

func (e *StateLockError) Severity() compositeerrors.Severity

func (*StateLockError) Type added in v0.19.1054

type TerraformError

type TerraformError struct {
	// Summary is the first terraform error summary (the text after "Error:").
	Summary string `json:"summary"`
	// Errors lists every distinct error summary when terraform reported more
	// than one. Empty when there is only the single Summary.
	Errors []string `json:"errors,omitempty"`
	// Output is the cleaned, possibly-truncated diagnostic output.
	Output string `json:"output,omitempty"`
}

TerraformError is the tool-layer payload: the terraform "Error:" summaries extracted from the diagnostics, plus the cleaned output for context.

func (*TerraformError) Error

func (e *TerraformError) Error() string

Error returns the first error summary as the headline, noting the count when terraform reported several. The summary is truncated first so the "+N more" suffix is never cut off.

func (*TerraformError) Sections

func (e *TerraformError) Sections() []compositeerrors.Section

Sections lists every summary when there are several (the headline shows only the first), then the cleaned diagnostic output for full context.

func (*TerraformError) Severity

func (e *TerraformError) Severity() compositeerrors.Severity

func (*TerraformError) Type

Jump to

Keyboard shortcuts

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