declarative

package
v1.122.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package declarative classifies Databricks API errors that carry server-provided "declarative_context" metadata, so generated Terraform resources can act on server-signaled conditions (e.g. suppress a Delete error when a parent will cascade-clean the child).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDeleteError

func IsDeleteError(err error) bool

IsDeleteError reports whether err is an actionable Delete error that the caller should surface. It returns false when err carries a declarative_context marker (today: MANAGED_BY_PARENT) signaling that the Delete is safe to disregard — when the resource's lifecycle is owned by a parent (e.g. a Lakebase endpoint inside a branch), the server rejects the standalone Delete knowing the parent will cascade-clean.

Call sites null out err when this returns false, then fall through to the existing error-handling chain:

if !declarative.IsDeleteError(err) {
    err = nil
}
if err != nil && !apierr.IsMissing(err) { ... }

apierr.IsMissing (404-on-delete) is a separate SDK convention and stays at the call site.

Types

This section is empty.

Jump to

Keyboard shortcuts

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