Sanity Library Reference Docs
    Preparing search index...

    Interface BlueprintResourceLifecycleConfig<Lifecycle>

    The lifecycle options that definers accept. They are the same as the resource BlueprintResourceLifecycle, except that dependsOn also takes the resources themselves.

    interface BlueprintResourceLifecycleConfig<
        Lifecycle extends
            BlueprintResourceLifecycle = BlueprintResourceLifecycle,
    > {
        deletionPolicy?: Lifecycle["deletionPolicy"];
        dependsOn?: string
        | ResourceRef<string>
        | (string | ResourceRef<string>)[];
        ownershipAction?: Lifecycle["ownershipAction"];
    }

    Type Parameters

    Index

    Properties

    deletionPolicy?: Lifecycle["deletionPolicy"]
    dependsOn?: string | ResourceRef<string> | (string | ResourceRef<string>)[]

    Declares a dependency on another resource or list of resources in the blueprint. The referenced resources will be deployed before this one.

    Takes the resources that definers return, or references starting with $.resources. followed by the name of the resource. Other options that reference a resource already create a dependency on it, so this is only needed when nothing else does.

    const dataset = defineDataset({name: 'production'})

    defineStudio({
    name: 'studio',
    root: 'studio',
    lifecycle: {dependsOn: [dataset]},
    })
    ownershipAction?: Lifecycle["ownershipAction"]