specmerge

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorReasonCodeUnexpectedComputedField
	// is provided when the reason for an error
	// during deployment due to an unexpected computed field
	// being returned by a resource plugin implementation's deploy method.
	ErrorReasonCodeUnexpectedComputedField errors.ErrorReasonCode = "unexpected_computed_field"
)

Variables

This section is empty.

Functions

func IsComputedField

func IsComputedField(changes *provider.Changes, fieldPath string) bool

IsComputedField returns whether the given field path is a computed field in the given set of resource changes.

func IsComputedFieldInList

func IsComputedFieldInList(expectedComputedFields []string, fieldPath string) bool

IsComputedFieldInList returns whether the given field path is a computed field in the given list of computed fields.

This allows for matching "[0]" and "[\"<key>\"]" placeholders in the expectedComputedFields list to match any array item or map key-value pair in the computed field path.

func MergeResourceSpec

func MergeResourceSpec(
	resolvedResource *provider.ResolvedResource,
	resourceName string,
	computedFieldValues map[string]*core.MappingNode,

	expectedComputedFields []string,
) (*core.MappingNode, error)

MergeResourceSpec merges a partially resolved resource with computed field values. Resource provider plugins can return a set of computed fields after they have deployed a resource. It is the responsibility of the blueprint container to merge these computed fields with the resolved resource spec containing values derived from the user-provided input and any default values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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