Anchorage API reference
    Preparing search index...
    interface ProvisioningBackend {
        immutableExternalArtifacts?: true;
        kind: ProvisioningBackendKind;
        applyMigrations(
            database: DatabaseReference,
            migrations: readonly D1Migration[],
            fence: ExternalMutationFence,
        ): Promise<void>;
        assertApplicationR2Detached?(
            resource: ApplicationR2Binding,
            fence: ExternalMutationFence,
        ): Promise<void>;
        assertApplicationR2Empty?(
            resource: ApplicationR2Binding,
            fence: ExternalMutationFence,
        ): Promise<void>;
        assertDatabaseDetached(
            spec: DeploymentSpec,
            record: FleetRecord,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        assertTrafficRemoved(spec: DeploymentSpec): Promise<void>;
        attestActiveRoute(spec: DeploymentSpec): Promise<ActiveRouteAttestation>;
        deleteApplicationR2Bucket?(
            resource: ApplicationR2Binding,
            fence: ExternalMutationFence,
        ): Promise<void>;
        deleteDatabase(
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        deletePlatformResources?(
            spec: DeploymentSpec,
            record: FleetRecord,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        deleteRetainedRelease?(
            spec: DeploymentSpec,
            release: ExternalReleaseSnapshot,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        deleteWorker(
            spec: DeploymentSpec,
            retainedReleases: readonly ExternalReleaseSnapshot[] | undefined,
            database: DatabaseReference,
            activeRelease: ExternalReleaseSnapshot | undefined,
            fence: ExternalMutationFence,
        ): Promise<void>;
        deployWorker(
            spec: DeploymentSpec,
            database: DatabaseReference,
            secrets: DeploymentSecrets,
            platformResources: ExternalPlatformResources | undefined,
            fence: ExternalMutationFence,
            expectedArtifactVersion: string | undefined,
            application?: ApplicationBindingTopology,
        ): Promise<
            {
                artifactVersion: string;
                created: boolean;
                physicalScriptName?: string;
            },
        >;
        describeExternalPlatformTarget?(
            spec: DeploymentSpec,
        ): ExternalPlatformTargetDescription;
        ensureApplicationR2Bucket?(
            resource: ApplicationR2Binding,
            fence: ExternalMutationFence,
        ): Promise<ApplicationR2BucketSnapshot>;
        ensureDatabase(
            spec: DeploymentSpec,
            fence: ExternalMutationFence,
        ): Promise<DatabaseReference>;
        ensureMaintenance(
            spec: DeploymentSpec,
            maintenanceAdminSecret: string,
            fence: ExternalMutationFence,
            expectedArtifactVersion: string | undefined,
        ): Promise<MaintenanceHealth>;
        ensurePlatformResources?(
            spec: DeploymentSpec,
            database: DatabaseReference,
            secrets: DeploymentSecrets,
            expectedTarget: ExternalPlatformTargetDescription | undefined,
            currentRecord: FleetRecord,
            fence: ExternalMutationFence,
        ): Promise<PlatformResourceProvisioningResult>;
        exportDatabase(
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<DatabaseExport>;
        findApplicationR2Bucket?(
            resource: ApplicationR2Binding,
        ): Promise<ApplicationR2BucketSnapshot | undefined>;
        findDatabase(spec: DeploymentSpec): Promise<DatabaseReference | undefined>;
        forceDecommissionStep?(
            record: FleetRecord,
            step: ForceDecommissionStep,
            fence: ExternalMutationFence,
        ): Promise<void>;
        getDatabase(databaseId: string): Promise<DatabaseReference | undefined>;
        inspect(
            spec: DeploymentSpec,
            maintenanceAdminSecret: string,
            expectedArtifactVersion: string | undefined,
        ): Promise<LiveDeployment | undefined>;
        inspectPlatformResources?(
            spec: DeploymentSpec,
            database: DatabaseReference,
        ): Promise<ExternalPlatformResources | undefined>;
        promoteWorker(
            spec: DeploymentSpec,
            guard: PromotionGuard,
            outboundPolicy: DeploymentEgressPolicy | undefined,
            fence: ExternalMutationFence,
            expectedArtifactVersion: string | undefined,
        ): Promise<void>;
        readDeploymentIdentity(
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<string | undefined>;
        releaseScriptName?(spec: DeploymentSpec): string;
        removeTraffic(
            spec: DeploymentSpec,
            retainedReleases: readonly ExternalReleaseSnapshot[] | undefined,
            activeRelease: ExternalReleaseSnapshot | undefined,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        revokeCredentials(
            spec: DeploymentSpec,
            retainedReleases: readonly ExternalReleaseSnapshot[] | undefined,
            activeRelease: ExternalReleaseSnapshot | undefined,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        revokePlatformResourceCredentials?(
            spec: DeploymentSpec,
            record: FleetRecord,
            database: DatabaseReference,
            fence: ExternalMutationFence,
        ): Promise<void>;
        seedDeploymentIdentity(
            database: DatabaseReference,
            tenantTag: string,
            fence: ExternalMutationFence,
            options: SeedDeploymentIdentityOptions,
        ): Promise<void>;
    }

    Implemented by

    Index

    Properties

    immutableExternalArtifacts?: true

    Methods

    • Provider truth about what is ROUTED, never desired state.

      inspect() answers a different question — "does the deployment the control plane WANTS exist and match?" — and deliberately pins a staged candidate that is receiving none of the traffic, so a converge can compare against it before promoting it. That makes it the wrong instrument for asking what is serving requests: a candidate uploaded and never promoted answers as though it were live. This method answers only the second question and never pins a candidate; the two views stay separate on purpose.

      Read-only and lease-free. Provider GET/HEAD requests bypass the external mutation fence, so a caller holding no deployment lease may attest, and a caller already inside one does not nest a second.

      Refuses rather than guessing: a Worker splitting traffic across versions, a hostname routed nowhere, or a routed artifact carrying no fleet specification digest all throw ActiveRouteAttestationError carrying what the provider did report. There is no highest-percentage fallback — an attestation is either unambiguous or it is a refusal.

      Parameters

      Returns Promise<ActiveRouteAttestation>

    • Stamp the database's ownership sentinel and seed its initial execution fence row.

      initialExecutionFenceState is a REQUIRED option rather than backend configuration because it is a per-provisioning decision: the same control plane brings ordinary deployments up open and migration targets up locked. It carries no default anywhere on this path — a migration target that came up open would be executing exactly when it must not.

      It rides an OPTIONS object rather than a fourth positional because this method is implemented by every backend and faked by every test that builds one: the next piece of provisioning context to reach the seeding protocol would otherwise mean a fifth positional and the same fan-out again, and positional four and five of a five-argument call are exactly where a transposed argument compiles and provisions the wrong thing.

      Parameters

      Returns Promise<void>