Documentation
¶
Index ¶
- func ApplyOutputsMapping(values map[string]any, secrets map[string]any, outputsMap map[string]string, ...) (map[string]any, map[string]any, error)
- func ShallowMergeParameters(base map[string]any, override map[string]any) map[string]any
- func ValidateOutputsMapping(recipeName string, resourceType string, declaredOutputs []string, ...) error
- type MissingOutputValuesError
- type OutputMappingError
- type RecipeDeploymentStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOutputsMapping ¶ added in v0.60.0
func ApplyOutputsMapping(values map[string]any, secrets map[string]any, outputsMap map[string]string, secretOutputsMap map[string]string) (map[string]any, map[string]any, error)
ApplyOutputsMapping renames a direct module's outputs onto resource property names.
Keys in outputsMap and secretOutputsMap are resource property names; values are module output names.
- outputsMap entries route a module output to a value or a secret depending on how the module itself classified it (a secure Bicep output / sensitive Terraform output lands in secrets, otherwise values).
- secretOutputsMap entries always route the referenced module output to secrets, regardless of how the module classified it. This lets a recipe pack force an output (for example an AVM module's `primaryConnectionString`, which the module declares as a plain string) to be treated as a secret.
When both maps are empty, the original values and secrets are returned unchanged (nil maps are normalized to empty maps so callers always receive non-nil maps). Missing or null ordinary outputs are omitted. Missing or null secret outputs return MissingOutputValuesError because silently dropping them could clear previously materialized secret data.
func ShallowMergeParameters ¶ added in v0.60.0
ShallowMergeParameters merges two parameter maps with top-level key precedence from override. Nested objects are replaced entirely, not deep-merged (per the direct module support design).
Types ¶
type MissingOutputValuesError ¶ added in v0.61.0
type MissingOutputValuesError struct {
// MissingMappings contains the deterministically ordered mappings without runtime values.
MissingMappings []string
// AvailableOutputs contains the deterministically ordered non-null deployment output names.
AvailableOutputs []string
}
MissingOutputValuesError reports secret mappings whose deployment output is missing or null.
func (*MissingOutputValuesError) Error ¶ added in v0.61.0
func (e *MissingOutputValuesError) Error() string
Error describes missing secret values and lists the non-null deployment outputs.
type OutputMappingError ¶ added in v0.61.0
type OutputMappingError struct {
// MissingMappings contains the deterministically ordered invalid mapping descriptions.
MissingMappings []string
// AvailableOutputs contains the deterministically ordered module output names.
AvailableOutputs []string
}
OutputMappingError reports mappings that refer to undeclared module outputs.
func (*OutputMappingError) Error ¶ added in v0.61.0
func (e *OutputMappingError) Error() string
Error describes invalid mappings and lists the module's declared outputs.
type RecipeDeploymentStatus ¶
type RecipeDeploymentStatus string
const ( // ExecutionError represents a failure status during recipe execution. ExecutionError RecipeDeploymentStatus = "executionError" // RecipeSetupError represents a failure that happens before a recipe or output resources are deployed. RecipeSetupError RecipeDeploymentStatus = "setupError" // Success represents a successful recipe execution. Success RecipeDeploymentStatus = "success" )