package
1.12.0-alpha20250213
Repository: https://github.com/hashicorp/terraform.git
Documentation: pkg.go.dev
# Functions
AttributeValue returns a diagnostic about an attribute value in an implied current configuration context.
CompactValueStr produces a compact, single-line summary of a given value that is suitable for display in the UI.
DiagnosticCausedByEphemeral returns true if the given diagnostic has an indication that it was caused by the presence of deferred values during an expression evaluation.
DiagnosticCausedBySensitive returns true if the given diagnostic has an indication that it was caused by the presence of sensitive values during an expression evaluation.
DiagnosticCausedByUnknown returns true if the given diagnostic has an indication that it was caused by the presence of unknown values during an expression evaluation.
DoNotConsolidateDiagnostic returns true if the given diagnostic should not be consolidated by the Diagnostics.ConsolidateWarnings function.
ExtraInfo tries to retrieve extra information of interface type T from the given diagnostic.
ExtraInfoNext takes a value previously returned by ExtraInfo and attempts to find an implementation of interface T wrapped inside of it.
GetAttribute extracts an attribute cty.Path from a diagnostic if it contains one.
Override matches OverrideAll except it operates over a single Diagnostic rather than multiple Diagnostics.
OverrideAll accepts a set of Diagnostics and wraps them with a new severity and, optionally, a new ExtraInfo.
SimpleWarning constructs a simple (summary-only) warning diagnostic.
Sourceless creates and returns a diagnostic with no source location information.
SourceRangeFromHCL constructs a SourceRange from the corresponding range type within the HCL package.
TraversalStr produces a representation of an HCL traversal that is compact, resembles HCL native syntax, and is suitable for display in the UI.
UndoOverride will return the original diagnostic that was overridden within the OverrideAll function.
WarningGroupSourceRanges can be used in conjunction with Diagnostics.ConsolidateWarnings to recover the full set of original source locations from a consolidated warning.
WholeContainingBody returns a diagnostic about the body that is an implied current configuration context.
# Variables
DiagnosticComparer returns a cmp.Option that can be used with the package github.com/google/go-cmp/cmp.
FormatCtyPath is a helper function to produce a user-friendly string representation of a cty.Path.
FormatError is a helper function to produce a user-friendly string representation of certain special error types that we might want to include in diagnostic messages.
FormatErrorPrefixed is like FormatError except that it presents any path information after the given prefix string, which is assumed to contain an HCL syntax representation of the value that errors are relative to.
# Structs
No description provided by the author
DiagnosticsAsError embeds diagnostics, and satisfies the error interface.
No description provided by the author
NonFatalError is a special error type, returned by Diagnostics.ErrWithWarnings and Diagnostics.NonFatalErr, that indicates that the wrapped diagnostics should be treated as non-fatal.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
DiagnosticExtraBecauseEphemeral is an interface implemented by values in the Extra field of Diagnostic when the diagnostic is potentially caused by the presence of ephemeral values in an expression evaluation.
DiagnosticExtraBecauseSensitive is an interface implemented by values in the Extra field of Diagnostic when the diagnostic is potentially caused by the presence of sensitive values in an expression evaluation.
DiagnosticExtraBecauseUnknown is an interface implemented by values in the Extra field of Diagnostic when the diagnostic is potentially caused by the presence of unknown values in an expression evaluation.
DiagnosticExtraDoNotConsolidate tells the Diagnostics.ConsolidateWarnings function not to consolidate this diagnostic if it otherwise would.
DiagnosticExtraUnwrapper is an interface implemented by values in the Extra field of Diagnostic when they are wrapping another "Extra" value that was generated downstream.
DiagnosticExtraWrapper is an interface implemented by values that can be dynamically updated to wrap other extra info.