cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema

animeshjain
New Contributor II

Environment:

  • Bundle engine: direct
  • Resource type: Volume (Unity Catalog)

Problem:

I'm trying to use the lifecycle field with prevent_destroy: true on a Unity Catalog volume resource in my Declarative Automation Bundle (DAB). the validation fails with:

Error: Error while loading volume
at resources.volumes.raw_zone

ValueError: Unexpected field 'lifecycle' for class Volume

```yaml

resources:
volumes:
raw_zone:
catalog_name: "datazone_dev"
schema_name: "source"
name: "raw_zone"
comment: "Volume created for raw zone data storage"
volume_type: "MANAGED"
lifecycle:
prevent_destroy: true
grants:
- principal: "user-name1"
privileges:
- READ_VOLUME
- WRITE_VOLUME

```

 
When I run databricks bundle schema, the JSON schema clearly shows that lifecycle is a valid field for Volume resources:
"resources.Volume": {
"type": "object",
"properties": {
"catalog_name": { ... },
"comment": { ... },
"grants": { ... },
"lifecycle": {
"description": "Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.",
"$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle"
},
"name": { ... },
"schema_name": { ... },
"volume_type": { ... }
}
}

is there something where I am wrong to get this error 

animeshjain_0-1783340968236.pnganimeshjain_1-1783340987403.png

 

0 REPLIES 0