Skip to content

Commit c779b91

Browse files
denikclaude
andauthored
Modify grants to use SDK types (#4666)
## Changes - Replace five custom grant types (Grant, SchemaGrant, CatalogGrant, ExternalLocationGrant, VolumeGrant) and their associated per-resource privilege enums with catalog.PrivilegeAssignment from the Databricks SDK. - Simplifies PrepareGrantsInputConfig in bundle/direct/dresources/grants.go: removes the reflection-based conversion loop and replaces it with a direct type assertion, now that all grant slices share the same type. ## Why Maintaining custom types is manual process. This prevents us from moving to autogenerated resources. This also causes issues for users where definition in CLI lags behind. #3821 #4008 --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
1 parent 4874a3c commit c779b91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1106
-1510
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### CLI
66

77
### Bundles
8+
* Modify grants to use SDK types ([#4666](https://github.com/databricks/cli/pull/4666))
89

910
### Dependency updates
1011

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
bundle:
2+
name: my_project
3+
4+
sync: {paths: []} # don't need to copy files
5+
6+
experimental:
7+
python:
8+
resources:
9+
- "resources:load_resources"

acceptance/bundle/python/grants-aliases/out.test.toml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
>>> uv run --with-requirements requirements-latest.txt --no-cache -q [CLI] bundle validate --output json
3+
{
4+
"experimental": {
5+
"python": {
6+
"resources": [
7+
"resources:load_resources"
8+
]
9+
}
10+
},
11+
"resources": {
12+
"schemas": {
13+
"my_schema": {
14+
"catalog_name": "my_catalog",
15+
"grants": [
16+
{
17+
"principal": "[email protected]",
18+
"privileges": [
19+
"USE_SCHEMA"
20+
]
21+
}
22+
],
23+
"name": "my_schema"
24+
},
25+
"my_schema_legacy": {
26+
"catalog_name": "my_catalog",
27+
"grants": [
28+
{
29+
"principal": "[email protected]",
30+
"privileges": [
31+
"USE_SCHEMA"
32+
]
33+
}
34+
],
35+
"name": "my_schema_legacy"
36+
}
37+
}
38+
}
39+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from databricks.bundles.core import Resources
2+
3+
# New unified types (preferred going forward)
4+
from databricks.bundles.schemas import Privilege, PrivilegeAssignment
5+
6+
# Old per-resource aliases (kept for backward compatibility)
7+
from databricks.bundles.schemas import SchemaGrant, SchemaGrantPrivilege
8+
9+
10+
def load_resources() -> Resources:
11+
resources = Resources()
12+
13+
resources.add_schema(
14+
"my_schema",
15+
{
16+
"name": "my_schema",
17+
"catalog_name": "my_catalog",
18+
# New type
19+
"grants": [
20+
PrivilegeAssignment(
21+
principal="[email protected]",
22+
privileges=[Privilege.USE_SCHEMA],
23+
)
24+
],
25+
},
26+
)
27+
28+
resources.add_schema(
29+
"my_schema_legacy",
30+
{
31+
"name": "my_schema_legacy",
32+
"catalog_name": "my_catalog",
33+
# Old alias type — identical to PrivilegeAssignment at runtime
34+
"grants": [
35+
SchemaGrant(
36+
principal="[email protected]",
37+
privileges=[SchemaGrantPrivilege.USE_SCHEMA],
38+
)
39+
],
40+
},
41+
)
42+
43+
return resources
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
echo "$DATABRICKS_BUNDLES_WHEEL" > "requirements-latest.txt"
2+
3+
trace uv run $UV_ARGS -q $CLI bundle validate --output json | \
4+
jq "pick(.experimental.python, .resources)"
5+
6+
rm -fr .databricks __pycache__
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Local = true
2+
Cloud = false # tests don't interact with APIs
3+
4+
[EnvMatrix]
5+
UV_ARGS = [
6+
"--with-requirements requirements-latest.txt --no-cache",
7+
]

acceptance/bundle/refschema/out.fields.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ resources.catalogs.*.effective_predictive_optimization_flag.inherited_from_type
233233
resources.catalogs.*.effective_predictive_optimization_flag.value catalog.EnablePredictiveOptimization REMOTE
234234
resources.catalogs.*.enable_predictive_optimization catalog.EnablePredictiveOptimization REMOTE
235235
resources.catalogs.*.full_name string REMOTE
236-
resources.catalogs.*.grants []resources.CatalogGrant INPUT
237-
resources.catalogs.*.grants[*] resources.CatalogGrant INPUT
236+
resources.catalogs.*.grants []catalog.PrivilegeAssignment INPUT
237+
resources.catalogs.*.grants[*] catalog.PrivilegeAssignment INPUT
238238
resources.catalogs.*.grants[*].principal string INPUT
239-
resources.catalogs.*.grants[*].privileges []resources.CatalogGrantPrivilege INPUT
240-
resources.catalogs.*.grants[*].privileges[*] resources.CatalogGrantPrivilege INPUT
239+
resources.catalogs.*.grants[*].privileges []catalog.Privilege INPUT
240+
resources.catalogs.*.grants[*].privileges[*] catalog.Privilege INPUT
241241
resources.catalogs.*.id string INPUT
242242
resources.catalogs.*.isolation_mode catalog.CatalogIsolationMode REMOTE
243243
resources.catalogs.*.lifecycle resources.Lifecycle INPUT
@@ -261,8 +261,8 @@ resources.catalogs.*.updated_at int64 REMOTE
261261
resources.catalogs.*.updated_by string REMOTE
262262
resources.catalogs.*.url string INPUT
263263
resources.catalogs.*.grants.full_name string ALL
264-
resources.catalogs.*.grants.grants []dresources.GrantAssignment ALL
265-
resources.catalogs.*.grants.grants[*] dresources.GrantAssignment ALL
264+
resources.catalogs.*.grants.grants []catalog.PrivilegeAssignment ALL
265+
resources.catalogs.*.grants.grants[*] catalog.PrivilegeAssignment ALL
266266
resources.catalogs.*.grants.grants[*].principal string ALL
267267
resources.catalogs.*.grants.grants[*].privileges []catalog.Privilege ALL
268268
resources.catalogs.*.grants.grants[*].privileges[*] catalog.Privilege ALL
@@ -710,11 +710,11 @@ resources.external_locations.*.file_event_queue.provided_pubsub.subscription_nam
710710
resources.external_locations.*.file_event_queue.provided_sqs *catalog.AwsSqsQueue ALL
711711
resources.external_locations.*.file_event_queue.provided_sqs.managed_resource_id string ALL
712712
resources.external_locations.*.file_event_queue.provided_sqs.queue_url string ALL
713-
resources.external_locations.*.grants []resources.ExternalLocationGrant INPUT
714-
resources.external_locations.*.grants[*] resources.ExternalLocationGrant INPUT
713+
resources.external_locations.*.grants []catalog.PrivilegeAssignment INPUT
714+
resources.external_locations.*.grants[*] catalog.PrivilegeAssignment INPUT
715715
resources.external_locations.*.grants[*].principal string INPUT
716-
resources.external_locations.*.grants[*].privileges []resources.ExternalLocationGrantPrivilege INPUT
717-
resources.external_locations.*.grants[*].privileges[*] resources.ExternalLocationGrantPrivilege INPUT
716+
resources.external_locations.*.grants[*].privileges []catalog.Privilege INPUT
717+
resources.external_locations.*.grants[*].privileges[*] catalog.Privilege INPUT
718718
resources.external_locations.*.id string INPUT
719719
resources.external_locations.*.isolation_mode catalog.IsolationMode REMOTE
720720
resources.external_locations.*.lifecycle resources.Lifecycle INPUT
@@ -729,8 +729,8 @@ resources.external_locations.*.updated_at int64 REMOTE
729729
resources.external_locations.*.updated_by string REMOTE
730730
resources.external_locations.*.url string ALL
731731
resources.external_locations.*.grants.full_name string ALL
732-
resources.external_locations.*.grants.grants []dresources.GrantAssignment ALL
733-
resources.external_locations.*.grants.grants[*] dresources.GrantAssignment ALL
732+
resources.external_locations.*.grants.grants []catalog.PrivilegeAssignment ALL
733+
resources.external_locations.*.grants.grants[*] catalog.PrivilegeAssignment ALL
734734
resources.external_locations.*.grants.grants[*].principal string ALL
735735
resources.external_locations.*.grants.grants[*].privileges []catalog.Privilege ALL
736736
resources.external_locations.*.grants.grants[*].privileges[*] catalog.Privilege ALL
@@ -2748,11 +2748,11 @@ resources.registered_models.*.comment string ALL
27482748
resources.registered_models.*.created_at int64 ALL
27492749
resources.registered_models.*.created_by string ALL
27502750
resources.registered_models.*.full_name string ALL
2751-
resources.registered_models.*.grants []resources.Grant INPUT
2752-
resources.registered_models.*.grants[*] resources.Grant INPUT
2751+
resources.registered_models.*.grants []catalog.PrivilegeAssignment INPUT
2752+
resources.registered_models.*.grants[*] catalog.PrivilegeAssignment INPUT
27532753
resources.registered_models.*.grants[*].principal string INPUT
2754-
resources.registered_models.*.grants[*].privileges []string INPUT
2755-
resources.registered_models.*.grants[*].privileges[*] string INPUT
2754+
resources.registered_models.*.grants[*].privileges []catalog.Privilege INPUT
2755+
resources.registered_models.*.grants[*].privileges[*] catalog.Privilege INPUT
27562756
resources.registered_models.*.id string INPUT
27572757
resources.registered_models.*.lifecycle resources.Lifecycle INPUT
27582758
resources.registered_models.*.lifecycle.prevent_destroy bool INPUT
@@ -2766,8 +2766,8 @@ resources.registered_models.*.updated_at int64 ALL
27662766
resources.registered_models.*.updated_by string ALL
27672767
resources.registered_models.*.url string INPUT
27682768
resources.registered_models.*.grants.full_name string ALL
2769-
resources.registered_models.*.grants.grants []dresources.GrantAssignment ALL
2770-
resources.registered_models.*.grants.grants[*] dresources.GrantAssignment ALL
2769+
resources.registered_models.*.grants.grants []catalog.PrivilegeAssignment ALL
2770+
resources.registered_models.*.grants.grants[*] catalog.PrivilegeAssignment ALL
27712771
resources.registered_models.*.grants.grants[*].principal string ALL
27722772
resources.registered_models.*.grants.grants[*].privileges []catalog.Privilege ALL
27732773
resources.registered_models.*.grants.grants[*].privileges[*] catalog.Privilege ALL
@@ -2784,11 +2784,11 @@ resources.schemas.*.effective_predictive_optimization_flag.inherited_from_type c
27842784
resources.schemas.*.effective_predictive_optimization_flag.value catalog.EnablePredictiveOptimization REMOTE
27852785
resources.schemas.*.enable_predictive_optimization catalog.EnablePredictiveOptimization REMOTE
27862786
resources.schemas.*.full_name string REMOTE
2787-
resources.schemas.*.grants []resources.SchemaGrant INPUT
2788-
resources.schemas.*.grants[*] resources.SchemaGrant INPUT
2787+
resources.schemas.*.grants []catalog.PrivilegeAssignment INPUT
2788+
resources.schemas.*.grants[*] catalog.PrivilegeAssignment INPUT
27892789
resources.schemas.*.grants[*].principal string INPUT
2790-
resources.schemas.*.grants[*].privileges []resources.SchemaGrantPrivilege INPUT
2791-
resources.schemas.*.grants[*].privileges[*] resources.SchemaGrantPrivilege INPUT
2790+
resources.schemas.*.grants[*].privileges []catalog.Privilege INPUT
2791+
resources.schemas.*.grants[*].privileges[*] catalog.Privilege INPUT
27922792
resources.schemas.*.id string INPUT
27932793
resources.schemas.*.lifecycle resources.Lifecycle INPUT
27942794
resources.schemas.*.lifecycle.prevent_destroy bool INPUT
@@ -2805,8 +2805,8 @@ resources.schemas.*.updated_at int64 REMOTE
28052805
resources.schemas.*.updated_by string REMOTE
28062806
resources.schemas.*.url string INPUT
28072807
resources.schemas.*.grants.full_name string ALL
2808-
resources.schemas.*.grants.grants []dresources.GrantAssignment ALL
2809-
resources.schemas.*.grants.grants[*] dresources.GrantAssignment ALL
2808+
resources.schemas.*.grants.grants []catalog.PrivilegeAssignment ALL
2809+
resources.schemas.*.grants.grants[*] catalog.PrivilegeAssignment ALL
28102810
resources.schemas.*.grants.grants[*].principal string ALL
28112811
resources.schemas.*.grants.grants[*].privileges []catalog.Privilege ALL
28122812
resources.schemas.*.grants.grants[*].privileges[*] catalog.Privilege ALL
@@ -2970,11 +2970,11 @@ resources.volumes.*.encryption_details.sse_encryption_details *catalog.SseEncryp
29702970
resources.volumes.*.encryption_details.sse_encryption_details.algorithm catalog.SseEncryptionDetailsAlgorithm REMOTE
29712971
resources.volumes.*.encryption_details.sse_encryption_details.aws_kms_key_arn string REMOTE
29722972
resources.volumes.*.full_name string REMOTE
2973-
resources.volumes.*.grants []resources.VolumeGrant INPUT
2974-
resources.volumes.*.grants[*] resources.VolumeGrant INPUT
2973+
resources.volumes.*.grants []catalog.PrivilegeAssignment INPUT
2974+
resources.volumes.*.grants[*] catalog.PrivilegeAssignment INPUT
29752975
resources.volumes.*.grants[*].principal string INPUT
2976-
resources.volumes.*.grants[*].privileges []resources.VolumeGrantPrivilege INPUT
2977-
resources.volumes.*.grants[*].privileges[*] resources.VolumeGrantPrivilege INPUT
2976+
resources.volumes.*.grants[*].privileges []catalog.Privilege INPUT
2977+
resources.volumes.*.grants[*].privileges[*] catalog.Privilege INPUT
29782978
resources.volumes.*.id string INPUT
29792979
resources.volumes.*.lifecycle resources.Lifecycle INPUT
29802980
resources.volumes.*.lifecycle.prevent_destroy bool INPUT
@@ -2990,8 +2990,8 @@ resources.volumes.*.url string INPUT
29902990
resources.volumes.*.volume_id string REMOTE
29912991
resources.volumes.*.volume_type catalog.VolumeType ALL
29922992
resources.volumes.*.grants.full_name string ALL
2993-
resources.volumes.*.grants.grants []dresources.GrantAssignment ALL
2994-
resources.volumes.*.grants.grants[*] dresources.GrantAssignment ALL
2993+
resources.volumes.*.grants.grants []catalog.PrivilegeAssignment ALL
2994+
resources.volumes.*.grants.grants[*] catalog.PrivilegeAssignment ALL
29952995
resources.volumes.*.grants.grants[*].principal string ALL
29962996
resources.volumes.*.grants.grants[*].privileges []catalog.Privilege ALL
29972997
resources.volumes.*.grants.grants[*].privileges[*] catalog.Privilege ALL

bundle/config/resources/catalog.go

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -13,81 +13,12 @@ import (
1313
"github.com/databricks/cli/libs/log"
1414
)
1515

16-
type CatalogGrantPrivilege string
17-
18-
const (
19-
CatalogGrantPrivilegeAllPrivileges CatalogGrantPrivilege = "ALL_PRIVILEGES"
20-
CatalogGrantPrivilegeApplyTag CatalogGrantPrivilege = "APPLY_TAG"
21-
CatalogGrantPrivilegeCreateConnection CatalogGrantPrivilege = "CREATE_CONNECTION"
22-
CatalogGrantPrivilegeCreateExternalLocation CatalogGrantPrivilege = "CREATE_EXTERNAL_LOCATION"
23-
CatalogGrantPrivilegeCreateExternalTable CatalogGrantPrivilege = "CREATE_EXTERNAL_TABLE"
24-
CatalogGrantPrivilegeCreateExternalVolume CatalogGrantPrivilege = "CREATE_EXTERNAL_VOLUME"
25-
CatalogGrantPrivilegeCreateForeignCatalog CatalogGrantPrivilege = "CREATE_FOREIGN_CATALOG"
26-
CatalogGrantPrivilegeCreateFunction CatalogGrantPrivilege = "CREATE_FUNCTION"
27-
CatalogGrantPrivilegeCreateManagedStorage CatalogGrantPrivilege = "CREATE_MANAGED_STORAGE"
28-
CatalogGrantPrivilegeCreateMaterializedView CatalogGrantPrivilege = "CREATE_MATERIALIZED_VIEW"
29-
CatalogGrantPrivilegeCreateModel CatalogGrantPrivilege = "CREATE_MODEL"
30-
CatalogGrantPrivilegeCreateSchema CatalogGrantPrivilege = "CREATE_SCHEMA"
31-
CatalogGrantPrivilegeCreateStorageCredential CatalogGrantPrivilege = "CREATE_STORAGE_CREDENTIAL"
32-
CatalogGrantPrivilegeCreateTable CatalogGrantPrivilege = "CREATE_TABLE"
33-
CatalogGrantPrivilegeCreateVolume CatalogGrantPrivilege = "CREATE_VOLUME"
34-
CatalogGrantPrivilegeExecute CatalogGrantPrivilege = "EXECUTE"
35-
CatalogGrantPrivilegeManage CatalogGrantPrivilege = "MANAGE"
36-
CatalogGrantPrivilegeModify CatalogGrantPrivilege = "MODIFY"
37-
CatalogGrantPrivilegeReadVolume CatalogGrantPrivilege = "READ_VOLUME"
38-
CatalogGrantPrivilegeRefresh CatalogGrantPrivilege = "REFRESH"
39-
CatalogGrantPrivilegeSelect CatalogGrantPrivilege = "SELECT"
40-
CatalogGrantPrivilegeUseCatalog CatalogGrantPrivilege = "USE_CATALOG"
41-
CatalogGrantPrivilegeUseConnection CatalogGrantPrivilege = "USE_CONNECTION"
42-
CatalogGrantPrivilegeUseSchema CatalogGrantPrivilege = "USE_SCHEMA"
43-
CatalogGrantPrivilegeWriteVolume CatalogGrantPrivilege = "WRITE_VOLUME"
44-
)
45-
46-
// Values returns all valid CatalogGrantPrivilege values
47-
func (CatalogGrantPrivilege) Values() []CatalogGrantPrivilege {
48-
return []CatalogGrantPrivilege{
49-
CatalogGrantPrivilegeAllPrivileges,
50-
CatalogGrantPrivilegeApplyTag,
51-
CatalogGrantPrivilegeCreateConnection,
52-
CatalogGrantPrivilegeCreateExternalLocation,
53-
CatalogGrantPrivilegeCreateExternalTable,
54-
CatalogGrantPrivilegeCreateExternalVolume,
55-
CatalogGrantPrivilegeCreateForeignCatalog,
56-
CatalogGrantPrivilegeCreateFunction,
57-
CatalogGrantPrivilegeCreateManagedStorage,
58-
CatalogGrantPrivilegeCreateMaterializedView,
59-
CatalogGrantPrivilegeCreateModel,
60-
CatalogGrantPrivilegeCreateSchema,
61-
CatalogGrantPrivilegeCreateStorageCredential,
62-
CatalogGrantPrivilegeCreateTable,
63-
CatalogGrantPrivilegeCreateVolume,
64-
CatalogGrantPrivilegeExecute,
65-
CatalogGrantPrivilegeManage,
66-
CatalogGrantPrivilegeModify,
67-
CatalogGrantPrivilegeReadVolume,
68-
CatalogGrantPrivilegeRefresh,
69-
CatalogGrantPrivilegeSelect,
70-
CatalogGrantPrivilegeUseCatalog,
71-
CatalogGrantPrivilegeUseConnection,
72-
CatalogGrantPrivilegeUseSchema,
73-
CatalogGrantPrivilegeWriteVolume,
74-
}
75-
}
76-
77-
// CatalogGrant holds the grant level settings for a single principal in Unity Catalog.
78-
// Multiple of these can be defined on any catalog.
79-
type CatalogGrant struct {
80-
Privileges []CatalogGrantPrivilege `json:"privileges"`
81-
82-
Principal string `json:"principal"`
83-
}
84-
8516
type Catalog struct {
8617
BaseResource
8718
catalog.CreateCatalog
8819

8920
// List of grants to apply on this catalog.
90-
Grants []CatalogGrant `json:"grants,omitempty"`
21+
Grants []catalog.PrivilegeAssignment `json:"grants,omitempty"`
9122
}
9223

9324
func (c *Catalog) Exists(ctx context.Context, w *databricks.WorkspaceClient, name string) (bool, error) {

bundle/config/resources/external_location.go

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,6 @@ import (
1212
"github.com/databricks/cli/libs/log"
1313
)
1414

15-
type ExternalLocationGrantPrivilege string
16-
17-
const (
18-
ExternalLocationGrantPrivilegeAllPrivileges ExternalLocationGrantPrivilege = "ALL_PRIVILEGES"
19-
ExternalLocationGrantPrivilegeCreateExternalTable ExternalLocationGrantPrivilege = "CREATE_EXTERNAL_TABLE"
20-
ExternalLocationGrantPrivilegeCreateExternalVolume ExternalLocationGrantPrivilege = "CREATE_EXTERNAL_VOLUME"
21-
ExternalLocationGrantPrivilegeCreateManagedStorage ExternalLocationGrantPrivilege = "CREATE_MANAGED_STORAGE"
22-
ExternalLocationGrantPrivilegeCreateTable ExternalLocationGrantPrivilege = "CREATE_TABLE"
23-
ExternalLocationGrantPrivilegeCreateVolume ExternalLocationGrantPrivilege = "CREATE_VOLUME"
24-
ExternalLocationGrantPrivilegeManage ExternalLocationGrantPrivilege = "MANAGE"
25-
ExternalLocationGrantPrivilegeReadFiles ExternalLocationGrantPrivilege = "READ_FILES"
26-
ExternalLocationGrantPrivilegeWriteFiles ExternalLocationGrantPrivilege = "WRITE_FILES"
27-
)
28-
29-
// Values returns all valid ExternalLocationGrantPrivilege values
30-
func (ExternalLocationGrantPrivilege) Values() []ExternalLocationGrantPrivilege {
31-
return []ExternalLocationGrantPrivilege{
32-
ExternalLocationGrantPrivilegeAllPrivileges,
33-
ExternalLocationGrantPrivilegeCreateExternalTable,
34-
ExternalLocationGrantPrivilegeCreateExternalVolume,
35-
ExternalLocationGrantPrivilegeCreateManagedStorage,
36-
ExternalLocationGrantPrivilegeCreateTable,
37-
ExternalLocationGrantPrivilegeCreateVolume,
38-
ExternalLocationGrantPrivilegeManage,
39-
ExternalLocationGrantPrivilegeReadFiles,
40-
ExternalLocationGrantPrivilegeWriteFiles,
41-
}
42-
}
43-
44-
// ExternalLocationGrant holds the grant level settings for a single principal in Unity Catalog.
45-
// Multiple of these can be defined on any external location.
46-
type ExternalLocationGrant struct {
47-
Privileges []ExternalLocationGrantPrivilege `json:"privileges"`
48-
49-
Principal string `json:"principal"`
50-
}
51-
5215
type ExternalLocation struct {
5316
// Manually include BaseResource fields to avoid URL field conflict
5417
ID string `json:"id,omitempty" bundle:"readonly"`
@@ -59,7 +22,7 @@ type ExternalLocation struct {
5922
catalog.CreateExternalLocation
6023

6124
// List of grants to apply on this external location.
62-
Grants []ExternalLocationGrant `json:"grants,omitempty"`
25+
Grants []catalog.PrivilegeAssignment `json:"grants,omitempty"`
6326
}
6427

6528
func (e *ExternalLocation) Exists(ctx context.Context, w *databricks.WorkspaceClient, name string) (bool, error) {

0 commit comments

Comments
 (0)