Versions in this module Expand all Collapse all v0 v0.24.0 Jun 22, 2025 v0.23.0 Jun 21, 2025 v0.22.0 Jun 18, 2025 v0.21.0 Jun 17, 2025 v0.20.0 Jun 17, 2025 v0.19.0 Jun 17, 2025 v0.18.0 Jun 11, 2025 v0.17.1 Jun 10, 2025 Changes in this version + const ErrorReasonCodeBlueprintCycleDetected + const ErrorReasonCodeChildBlueprintError + const ErrorReasonCodeChildNotFoundInState + const ErrorReasonCodeDataSourceValidationErrors + const ErrorReasonCodeDeployMissingInstanceID + const ErrorReasonCodeDeployMissingPartiallyResolvedResource + const ErrorReasonCodeDeployMissingResourceChanges + const ErrorReasonCodeDriftDetected + const ErrorReasonCodeEmptyChildBlueprintPath + const ErrorReasonCodeExportValidationErrors + const ErrorReasonCodeIncludeValidationErrors + const ErrorReasonCodeInstanceIDAndNameProvided + const ErrorReasonCodeInvalidLogicalLinkName + const ErrorReasonCodeInvalidResourceType + const ErrorReasonCodeInvalidSpecExtension + const ErrorReasonCodeLinkNotFoundInState + const ErrorReasonCodeMaxBlueprintDepthExceeded + const ErrorReasonCodeMissingChildBlueprintPath + const ErrorReasonCodeMissingNameForNewInstance + const ErrorReasonCodeMissingProvider + const ErrorReasonCodeMissingResource + const ErrorReasonCodeRemovedChildHasDependents + const ErrorReasonCodeRemovedResourceHasDependents + const ErrorReasonCodeResourceNotFoundInState + const ErrorReasonCodeResourceTemplateLinkLengthMismatch + const ErrorReasonCodeResourceValidationErrors + const ErrorReasonCodeVariableValidationErrors + const ErrorReasonMissingTransformers + const MaxBlueprintDepth + var DefaultResourceStabilityPollingConfig = &ResourceStabilityPollingConfig + func GroupOrderedElementsForRemoval(orderedElements []*ElementWithAllDeps) [][]state.Element + func GroupOrderedNodes(orderedNodes []*DeploymentNode, refChainCollector refgraph.RefChainCollector) ([][]*DeploymentNode, error) + func PopulateDirectDependencies(ctx context.Context, allNodes []*DeploymentNode, ...) error + func PopulateResourceSpecDefaults(ctx context.Context, blueprint *schema.Blueprint, params core.BlueprintParams, ...) (*schema.Blueprint, error) + type BlueprintContainer interface + BlueprintSpec func() speccore.BlueprintSpec + Deploy func(ctx context.Context, input *DeployInput, channels *DeployChannels, ...) error + Destroy func(ctx context.Context, input *DestroyInput, channels *DeployChannels, ...) + Diagnostics func() []*core.Diagnostic + RefChainCollector func() refgraph.RefChainCollector + ResourceTemplates func() map[string]string + SpecLinkInfo func() links.SpecLinkInfo + StageChanges func(ctx context.Context, input *StageChangesInput, channels *ChangeStagingChannels, ...) error + func NewDefaultBlueprintContainer(spec speccore.BlueprintSpec, driftCheckEnabled bool, ...) BlueprintContainer + type BlueprintContainerDependencies struct + BlueprintPreparer BlueprintPreparer + ChangeStager ResourceChangeStager + ChangeStagingStateFactory ChangeStagingStateFactory + ChildBlueprintDeployer ChildBlueprintDeployer + ChildBlueprintDestroyer ChildBlueprintDestroyer + ChildChangeStager ChildChangeStager + Clock core.Clock + DefaultRetryPolicy *provider.RetryPolicy + DeploymentStateFactory DeploymentStateFactory + DriftChecker drift.Checker + IDGenerator core.IDGenerator + LinkChangeStager LinkChangeStager + LinkDeployer LinkDeployer + LinkDestroyer LinkDestroyer + LinkInfo links.SpecLinkInfo + LinkRegistry provider.LinkRegistry + Logger core.Logger + Providers map[string]provider.Provider + RefChainCollector refgraph.RefChainCollector + ResourceDeployer ResourceDeployer + ResourceDestroyer ResourceDestroyer + ResourceRegistry resourcehelpers.Registry + ResourceTemplates map[string]string + StateContainer state.Container + SubstitutionResolver subengine.SubstitutionResolver + type BlueprintDestroyer interface + Destroy func(ctx context.Context, input *DestroyInput, channels *DeployChannels, ...) + type BlueprintPrepareResult struct + BlueprintContainer BlueprintContainer + ParallelGroups [][]*DeploymentNode + ResourceProviderMap map[string]provider.Provider + type BlueprintPreparer interface + Prepare func(ctx context.Context, blueprint *schema.Blueprint, ...) (*BlueprintPrepareResult, error) + func NewDefaultBlueprintPreparer(providers map[string]provider.Provider, ...) BlueprintPreparer + type ChangeStagingChannels struct + ChildChangesChan chan ChildChangesMessage + CompleteChan chan changes.BlueprintChanges + ErrChan chan error + LinkChangesChan chan LinkChangesMessage + ResourceChangesChan chan ResourceChangesMessage + type ChangeStagingState interface + AddElementsThatMustBeRecreated func(mustRecreate *CollectedElements) + ApplyChildChanges func(changes ChildChangesMessage) + ApplyLinkChanges func(changes LinkChangesMessage) + ApplyResourceChanges func(changes ResourceChangesMessage) + CountPendingLinksForGroup func(group []*DeploymentNode) int + ExtractBlueprintChanges func() changes.BlueprintChanges + GetResourceChanges func(resourceName string) *provider.Changes + MarkLinkAsNoLongerPending func(resourceANode, resourceBNode *links.ChainLinkNode) + MustRecreateResourceOnRemovedDependencies func(resourceName string) bool + UpdateExportChanges func(collectedExportChanges *changes.IntermediaryBlueprintChanges) + UpdateLinkStagingState func(node *links.ChainLinkNode) []*LinkPendingCompletion + UpdateMetadataChanges func(changes *changes.MetadataChanges, resolveOnDeploy []string) + func NewDefaultChangeStagingState() ChangeStagingState + type ChangeStagingStateFactory func() ChangeStagingState + type ChildBlueprintDeployer interface + Deploy func(ctx context.Context, parentInstanceID string, parentInstanceTreePath string, ...) + func NewDefaultChildBlueprintDeployer(substitutionResolver IncludeSubstitutionResolver, ...) ChildBlueprintDeployer + type ChildBlueprintDestroyer interface + Destroy func(ctx context.Context, childBlueprintElement state.Element, ...) + func NewDefaultChildBlueprintDestroyer() ChildBlueprintDestroyer + type ChildBlueprintIDInfo struct + ChildInstanceID string + ChildName string + func (r *ChildBlueprintIDInfo) ID() string + func (r *ChildBlueprintIDInfo) Kind() state.ElementKind + func (r *ChildBlueprintIDInfo) LogicalName() string + type ChildBlueprintLoaderFactory func(derivedFromTemplate []string, resourceTemplates map[string]string) Loader + type ChildChangeStager interface + StageChanges func(ctx context.Context, childInstanceInfo *ChildInstanceInfo, ...) + func NewDefaultChildChangeStager(childResolver includes.ChildResolver, ...) ChildChangeStager + type ChildChangesMessage struct + Changes changes.BlueprintChanges + ChildBlueprintName string + New bool + Removed bool + type ChildDeployUpdateMessage struct + ChildInstanceID string + ChildName string + Durations *state.InstanceCompletionDuration + FailureReasons []string + Group int + ParentInstanceID string + Status core.InstanceStatus + UpdateTimestamp int64 + type ChildInstanceInfo struct + IncludeTreePath string + ParentInstanceID string + ParentInstanceTreePath string + type CollectedElements struct + Children []*ChildBlueprintIDInfo + Links []*LinkIDInfo + Resources []*ResourceIDInfo + Total int + type CollectedResourceData struct + Description string + Metadata *state.ResourceMetadataState + Spec *core.MappingNode + TemplateName string + type DependenciesOverrider func(depsToOverride *BlueprintContainerDependencies) *BlueprintContainerDependencies + type DeployChannels struct + ChildUpdateChan chan ChildDeployUpdateMessage + DeploymentUpdateChan chan DeploymentUpdateMessage + ErrChan chan error + FinishChan chan DeploymentFinishedMessage + LinkUpdateChan chan LinkDeployUpdateMessage + ResourceUpdateChan chan ResourceDeployUpdateMessage + func CreateDeployChannels() *DeployChannels + type DeployContext struct + Channels *DeployChannels + CurrentGroupIndex int + DeploymentGroups [][]*DeploymentNode + Destroying bool + InputChanges *changes.BlueprintChanges + InstanceStateSnapshot *state.InstanceState + Logger core.Logger + ParamOverrides core.BlueprintParams + PreparedContainer BlueprintContainer + ResourceProviders map[string]provider.Provider + ResourceRegistry resourcehelpers.Registry + ResourceTemplates map[string]string + Rollback bool + StartTime time.Time + State DeploymentState + func DeployContextWithChannels(deployCtx *DeployContext, channels *DeployChannels) *DeployContext + func DeployContextWithGroup(deployCtx *DeployContext, groupIndex int) *DeployContext + func DeployContextWithInstanceSnapshot(deployCtx *DeployContext, instanceSnapshot *state.InstanceState) *DeployContext + func DeployContextWithLogger(deployCtx *DeployContext, logger core.Logger) *DeployContext + type DeployEvent struct + ChildUpdateEvent *ChildDeployUpdateMessage + DeploymentUpdateEvent *DeploymentUpdateMessage + FinishEvent *DeploymentFinishedMessage + LinkUpdateEvent *LinkDeployUpdateMessage + ResourceUpdateEvent *ResourceDeployUpdateMessage + func (e *DeployEvent) MarshalJSON() ([]byte, error) + func (e *DeployEvent) UnmarshalJSON(data []byte) error + type DeployInput struct + Changes *changes.BlueprintChanges + InstanceID string + InstanceName string + Rollback bool + type DeploymentFinishedMessage struct + Durations *state.InstanceCompletionDuration + FailureReasons []string + FinishTimestamp int64 + InstanceID string + Status core.InstanceStatus + UpdateTimestamp int64 + type DeploymentNode struct + ChainLinkNode *links.ChainLinkNode + ChildNode *refgraph.ReferenceChainNode + DirectDependencies []*DeploymentNode + func OrderItemsForDeployment(ctx context.Context, chains []*links.ChainLinkNode, ...) ([]*DeploymentNode, error) + func (d *DeploymentNode) Name() string + func (d *DeploymentNode) Type() DeploymentNodeType + type DeploymentNodeType string + const DeploymentNodeTypeChild + const DeploymentNodeTypeResource + type DeploymentState interface + CheckUpdateElementDeploymentStarted func(element state.Element, otherConditionToStart bool) bool + GetElementDependencies func(element state.Element) *state.DependencyInfo + GetLinkDeployResult func(linkName string) *LinkDeployResult + GetLinkDurationInfo func(linkName string) *state.LinkCompletionDurations + GetPrepareDuration func() *time.Duration + GetResourceData func(resourceName string) *CollectedResourceData + GetResourceDurationInfo func(resourceName string) *state.ResourceCompletionDurations + IsElementConfigComplete func(element state.Element) bool + IsElementInProgress func(element state.Element) bool + SetCreatedElement func(element state.Element) + SetDestroyedElement func(element state.Element) + SetElementConfigComplete func(element state.Element) + SetElementDependencies func(element state.Element, dependencies *state.DependencyInfo) + SetElementInProgress func(element state.Element) + SetLinkDeployResult func(linkName string, result *LinkDeployResult) + SetLinkDurationInfo func(linkName string, durations *state.LinkCompletionDurations) + SetPrepareDuration func(prepareDuration time.Duration) + SetResourceData func(resourceName string, specState *CollectedResourceData) + SetResourceDurationInfo func(resourceName string, durations *state.ResourceCompletionDurations) + SetUpdatedElement func(element state.Element) + UpdateLinkDeploymentState func(node *links.ChainLinkNode) []*LinkPendingCompletion + func NewDefaultDeploymentState() DeploymentState + type DeploymentStateFactory func() DeploymentState + type DeploymentUpdateMessage struct + InstanceID string + Status core.InstanceStatus + UpdateTimestamp int64 + type DestroyInput struct + Changes *changes.BlueprintChanges + InstanceID string + InstanceName string + Rollback bool + type ElementWithAllDeps struct + AllDependencies []state.Element + DirectDependencies []state.Element + Element state.Element + func OrderElementsForRemoval(elements *CollectedElements, currentState *state.InstanceState) ([]*ElementWithAllDeps, error) + func (e *ElementWithAllDeps) Name() string + type EventType string + const EventTypeChildUpdate + const EventTypeDeploymentUpdate + const EventTypeFinish + const EventTypeLinkUpdate + const EventTypeResourceUpdate + type ExpandedResourceTemplateResult struct + ExpandedBlueprint *schema.Blueprint + ResourceTemplateMap map[string][]string + func ExpandResourceTemplates(ctx context.Context, blueprint *schema.Blueprint, ...) (*ExpandedResourceTemplateResult, error) + type IncludeSubstitutionResolver interface + ResolveInInclude func(ctx context.Context, includeName string, include *schema.Include, ...) (*subengine.ResolveInIncludeResult, error) + type LinkChangeStager interface + StageChanges func(ctx context.Context, linkImpl provider.Link, ...) error + func NewDefaultLinkChangeStager(stateContainer state.Container, ...) LinkChangeStager + type LinkChangesMessage struct + Changes provider.LinkChanges + New bool + Removed bool + ResourceAName string + ResourceBName string + type LinkDeployResult struct + IntermediaryResourceStates []*state.LinkIntermediaryResourceState + LinkData *core.MappingNode + type LinkDeployUpdateMessage struct + CanRetryCurrentStage bool + CurrentStageAttempt int + Durations *state.LinkCompletionDurations + FailureReasons []string + InstanceID string + LinkID string + LinkName string + PreciseStatus core.PreciseLinkStatus + Status core.LinkStatus + UpdateTimestamp int64 + type LinkDeployer interface + Deploy func(ctx context.Context, linkElement state.Element, instanceID string, ...) error + func NewDefaultLinkDeployer(clock core.Clock, stateContainer state.Container) LinkDeployer + type LinkDestroyer interface + Destroy func(ctx context.Context, element state.Element, instanceID string, ...) + func NewDefaultLinkDestroyer(linkDeployer LinkDeployer, linkRegistry provider.LinkRegistry, ...) LinkDestroyer + type LinkIDInfo struct + LinkID string + LinkName string + func (r *LinkIDInfo) ID() string + func (r *LinkIDInfo) Kind() state.ElementKind + func (r *LinkIDInfo) LogicalName() string + type LinkPendingCompletion struct + type Loader interface + Load func(ctx context.Context, blueprintSpecFile string, params bpcore.BlueprintParams) (BlueprintContainer, error) + LoadFromSchema func(ctx context.Context, blueprintSchema *schema.Blueprint, ...) (BlueprintContainer, error) + LoadString func(ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, ...) (BlueprintContainer, error) + Validate func(ctx context.Context, blueprintSpecFile string, params bpcore.BlueprintParams) (*ValidationResult, error) + ValidateFromSchema func(ctx context.Context, blueprintSchema *schema.Blueprint, ...) (*ValidationResult, error) + ValidateString func(ctx context.Context, blueprintSpec string, inputFormat schema.SpecFormat, ...) (*ValidationResult, error) + func NewDefaultLoader(providers map[string]provider.Provider, ...) Loader + type LoaderOption func(loader *defaultLoader) + func WithLoaderChangeStagingStateFactory(changeStagingStateFactory ChangeStagingStateFactory) LoaderOption + func WithLoaderChildBlueprintDestroyer(childBlueprintDestroyer ChildBlueprintDestroyer) LoaderOption + func WithLoaderClock(clock bpcore.Clock) LoaderOption + func WithLoaderDataSourceRegistry(dataSourceRegistry provider.DataSourceRegistry) LoaderOption + func WithLoaderDefaultRetryPolicy(retryPolicy *provider.RetryPolicy) LoaderOption + func WithLoaderDependenciesOverrider(overrider DependenciesOverrider) LoaderOption + func WithLoaderDeploymentStateFactory(deploymentStateFactory DeploymentStateFactory) LoaderOption + func WithLoaderDerivedFromTemplates(derivedFromTemplates []string) LoaderOption + func WithLoaderDriftCheckEnabled(driftCheckEnabled bool) LoaderOption + func WithLoaderDriftChecker(driftChecker drift.Checker) LoaderOption + func WithLoaderFunctionRegistry(funcRegistry provider.FunctionRegistry) LoaderOption + func WithLoaderIDGenerator(idGenerator bpcore.IDGenerator) LoaderOption + func WithLoaderLinkDeployer(linkDeployer LinkDeployer) LoaderOption + func WithLoaderLinkDestroyer(linkDestroyer LinkDestroyer) LoaderOption + func WithLoaderLinkRegistry(linkRegistry provider.LinkRegistry) LoaderOption + func WithLoaderLogger(logger bpcore.Logger) LoaderOption + func WithLoaderRefChainCollectorFactory(factory func() refgraph.RefChainCollector) LoaderOption + func WithLoaderResolveWorkingDir(resolveWorkingDir corefunctions.WorkingDirResolver) LoaderOption + func WithLoaderResourceDestroyer(resourceDestroyer ResourceDestroyer) LoaderOption + func WithLoaderResourceRegistry(resourceRegistry resourcehelpers.Registry) LoaderOption + func WithLoaderResourceStabilityPollingConfig(config *ResourceStabilityPollingConfig) LoaderOption + func WithLoaderResourceTemplates(resourceTemplates map[string]string) LoaderOption + func WithLoaderTransformSpec(transformSpec bool) LoaderOption + func WithLoaderValidateAfterTransform(validateAfterTransform bool) LoaderOption + func WithLoaderValidateRuntimeValues(validateRuntimeValues bool) LoaderOption + type ResourceChangeStager interface + StageChanges func(ctx context.Context, instanceID string, stagingState ChangeStagingState, ...) + func NewDefaultResourceChangeStager(substitutionResolver subengine.SubstitutionResolver, ...) ResourceChangeStager + type ResourceChangesMessage struct + Changes provider.Changes + ConditionKnownOnDeploy bool + New bool + Removed bool + ResolveOnDeploy []string + ResourceName string + type ResourceDeployUpdateMessage struct + Attempt int + CanRetry bool + Durations *state.ResourceCompletionDurations + FailureReasons []string + Group int + InstanceID string + PreciseStatus core.PreciseResourceStatus + ResourceID string + ResourceName string + Status core.ResourceStatus + UpdateTimestamp int64 + type ResourceDeployer interface + Deploy func(ctx context.Context, instanceID string, chainLinkNode *links.ChainLinkNode, ...) + func NewDefaultResourceDeployer(clock core.Clock, idGenerator core.IDGenerator, ...) ResourceDeployer + type ResourceDestroyer interface + Destroy func(ctx context.Context, resourceElement state.Element, instanceID string, ...) + func NewDefaultResourceDestroyer(clock core.Clock, defaultRetryPolicy *provider.RetryPolicy) ResourceDestroyer + type ResourceIDInfo struct + ResourceID string + ResourceName string + func (r *ResourceIDInfo) ID() string + func (r *ResourceIDInfo) Kind() state.ElementKind + func (r *ResourceIDInfo) LogicalName() string + type ResourceStabilityPollingConfig struct + PollingInterval time.Duration + PollingTimeout time.Duration + type ResourceSubstitutionResolver interface + ResolveInResource func(ctx context.Context, resourceName string, resource *schema.Resource, ...) (*subengine.ResolveInResourceResult, error) + type StageChangesInput struct + Destroy bool + InstanceID string + InstanceName string + type ValidationResult struct + Diagnostics []*bpcore.Diagnostic + LinkInfo links.SpecLinkInfo + Schema *schema.Blueprint