Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Breaking Changes

### New Features and Improvements
* Add `catalog_id` to the output of `databricks_catalog` resource.

### Bug Fixes

Expand Down
1 change: 1 addition & 0 deletions catalog/resource_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type CatalogInfo struct {
Owner string `json:"owner,omitempty" tf:"computed"`
IsolationMode string `json:"isolation_mode,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
CatalogID string `json:"catalog_id" tf:"computed"`
}

func ResourceCatalog() common.Resource {
Expand Down
1 change: 1 addition & 0 deletions catalog/resource_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ func TestCatalogSuppressCaseSensitivity(t *testing.T) {
"comment": "c",
},
ExpectedDiff: map[string]*terraform.ResourceAttrDiff{
"catalog_id": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"force_destroy": {Old: "", New: "false", NewComputed: false, NewRemoved: false, RequiresNew: false, Sensitive: false},
"isolation_mode": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
"owner": {Old: "", New: "", NewComputed: true, NewRemoved: false, RequiresNew: false, Sensitive: false},
Expand Down
3 changes: 2 additions & 1 deletion docs/data-sources/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ This data source exports the following attributes:
* `catalog_info` - the [CatalogInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CatalogInfo) object for a Unity Catalog catalog. This contains the following attributes (see ):
* `name` - Name of the catalog
* `full_name` The full name of the catalog. Corresponds with the name field.
* `catalog_type` - Type of the catalog, e.g. `MANAGED_CATALOG`, `DELTASHARING_CATALOG`, `SYSTEM_CATALOG`,
* `catalog_type` - Type of the catalog, e.g. `MANAGED_CATALOG`, `DELTASHARING_CATALOG`, `SYSTEM_CATALOG`,
* `owner` - Current owner of the catalog
* `catalog_id` - The unique identifier of the catalog.
* `comment` - Free-form text description
* `storage_location` - Storage Location URL (full path) for managed tables within catalog.
* `storage_root` - Storage root URL for managed tables within catalog.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following arguments are required:
In addition to all arguments above, the following attributes are exported:

* `id` - ID of this catalog - same as the `name`.
* `catalog_id` - The unique identifier of the catalog.
* `metastore_id` - ID of the parent metastore.

## Import
Expand Down
Loading