Commit d150916
authored
Show permissions & grants in plan; use resource keys in the output (#3961)
## Changes
The json plan for terraform now includes grants and permissions
resources and skip actions. This matches direct plan.
The text plan for terraform and direct now print permissions and grants
as separate resources.
The "The following resources will be deleted" message now mention
resources by full name, e.g. "resources.sql_warehouses.foo" instead of
"sql_warehouse foo". This matches "bundle plan" output and internal
representation. Note, this message still filters out permissions and
grants, they are not relevant there.
For context, we used to use terraform-based resource types and shows
grants & permissions in "will be deleted" message:
#3075
## Why
Consistency: we already use "resources.jobs.foo" format in json plan,
direct state file, error messages. This is extends it to the rest of the
output.
We need to treat grants and permissions as first class citizens, because
they need to be migrated. After migration we're going to ask users to
run "bundle plan" to check for permanent drift and it's important that
we show changes in permissions/grants there and also that we separate
them from their parent resource.
## Tests
Existing tests, some are extended to run additional "bundle plan"
commands.1 parent 134c1a8 commit d150916
File tree
194 files changed
+627
-268
lines changed- acceptance
- bundle
- apps/app_yaml
- bundle_tag
- id
- url_ref
- url
- deployment
- bind
- dashboard/recreation
- job/generate-and-bind
- unbind
- grants
- permissions
- deploy
- files/no-snapshot-sync
- mlops-stacks
- destroy
- all-resources
- jobs-and-pipeline
- generate/auto-bind
- integration_whl
- base
- custom_params
- interactive_cluster_dynamic_version
- interactive_cluster
- interactive_single_user
- serverless_custom_params
- serverless_dynamic_version
- serverless
- wrapper_custom_params
- wrapper
- lifecycle/prevent-destroy
- local_state_staleness
- resource_deps
- create_error
- jobs_update_remote
- jobs_update
- pipelines_recreate
- remote_app_url
- remote_field_storage_location
- resources
- apps/update
- clusters
- deploy
- data_security_mode
- simple
- update-after-create
- update-and-resize-autoscale
- update-and-resize
- run/spark_python_task
- dashboards
- change-embed-credentials
- change-name
- change-parent-path
- change-serialized-dashboard
- destroy
- detect-change
- generate_inplace
- nested-folders
- simple_outside_bundle_root
- simple_syncroot
- simple
- database_catalogs/basic
- database_instances/single-instance
- experiments/basic
- grants
- registered_models
- schemas/change_privilege
- volumes
- jobs
- check-metadata
- double-underscore-keys
- fail-on-active-runs
- no-git-provider
- update_single_node
- update
- model_serving_endpoints
- basic
- recreate
- catalog-name
- name-change
- route-optimized
- schema-name
- table-prefix
- running-endpoint
- models/basic
- permissions
- apps
- current_can_manage
- other_can_manage
- clusters/current_can_manage
- database_instances/current_can_manage
- experiments/current_can_manage
- factcheck
- jobs
- current_can_manage_run
- current_can_manage
- current_is_owner
- delete_one
- cloud
- local
- deleted_remotely
- destroy_without_mgmtperms
- with_permissions
- without_permissions
- empty_list
- other_can_manage_run
- other_can_manage
- other_is_owner
- update
- viewers
- models/current_can_manage
- pipelines
- current_can_manage
- current_is_owner
- empty_list
- other_can_manage
- other_is_owner
- update
- sql_warehouses/current_can_manage
- target_permissions
- pipelines
- allow-duplicate-names
- auto-approve
- lakeflow-pipeline
- recreate-keys
- change-catalog
- change-ingestion-definition
- change-storage
- recreate
- update
- registered_models/basic
- schemas
- auto-approve
- recreate
- secret_scopes
- sql_warehouses
- synced_database_tables/basic
- volumes
- change-comment
- change-schema-name
- recreate
- set-storage-location
- run_as/pipelines
- regular_user
- service_principal
- run/app-with-job
- summary/modified_status
- templates/default-python
- classic
- integration_classic
- user_agent/simple
- pipelines
- deploy/auto-approve
- destroy
- auto-approve
- destroy-pipeline
- force-lock
- e2e
- bundle
- deployplan
- deploy/terraform
- phases
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
194 files changed
+627
-268
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments