|
1 | 1 |
|
2 | 2 | === Initial view of resources without id and modified_status=created |
3 | 3 | >>> [CLI] bundle summary -o json |
4 | | -Warning: required field "evaluation" is not set |
5 | | - at resources.alerts.my_alert |
6 | | - in databricks.yml:6:7 |
7 | | - |
8 | | -Warning: required field "schedule" is not set |
9 | | - at resources.alerts.my_alert |
10 | | - in databricks.yml:6:7 |
11 | | - |
12 | 4 | { |
13 | 5 | "alerts": { |
14 | 6 | "my_alert": { |
15 | | - "custom_description": "test-alert-description", |
16 | | - "custom_summary": "test-alert-summary", |
17 | 7 | "display_name": "test-alert", |
| 8 | + "evaluation": { |
| 9 | + "comparison_operator": "EQUAL", |
| 10 | + "source": { |
| 11 | + "name": "1" |
| 12 | + }, |
| 13 | + "threshold": { |
| 14 | + "value": { |
| 15 | + "double_value": 2 |
| 16 | + } |
| 17 | + } |
| 18 | + }, |
18 | 19 | "modified_status": "created", |
19 | 20 | "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources", |
20 | | - "query_text": "SELECT 1", |
21 | | - "warehouse_id": "test-sql-warehouse" |
| 21 | + "query_text": "select 2", |
| 22 | + "schedule": { |
| 23 | + "quartz_cron_schedule": "44 19 */1 * * ?", |
| 24 | + "timezone_id": "Europe/Amsterdam" |
| 25 | + }, |
| 26 | + "warehouse_id": "aaaaaaaaaaaaaaaa" |
22 | 27 | } |
23 | 28 | }, |
24 | 29 | "pipelines": { |
@@ -63,31 +68,134 @@ Warning: required field "schedule" is not set |
63 | 68 | } |
64 | 69 |
|
65 | 70 | >>> [CLI] bundle deploy |
66 | | -Warning: required field "evaluation" is not set |
67 | | - at resources.alerts.my_alert |
68 | | - in databricks.yml:6:7 |
69 | | - |
70 | | -Warning: required field "schedule" is not set |
71 | | - at resources.alerts.my_alert |
72 | | - in databricks.yml:6:7 |
73 | | - |
74 | 71 | Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... |
75 | | -Error: exit status 1 |
| 72 | +Deploying resources... |
| 73 | +Updating deployment state... |
| 74 | +Deployment complete! |
76 | 75 |
|
77 | | -Error: Missing required argument |
78 | | - |
79 | | - on bundle.tf.json line 22, in resource.databricks_alert_v2.my_alert: |
80 | | - 22: } |
| 76 | +=== Post-deployment view of resources with id and without modified_status |
| 77 | +>>> [CLI] bundle summary -o json |
| 78 | +{ |
| 79 | + "alerts": { |
| 80 | + "my_alert": { |
| 81 | + "display_name": "test-alert", |
| 82 | + "evaluation": { |
| 83 | + "comparison_operator": "EQUAL", |
| 84 | + "source": { |
| 85 | + "name": "1" |
| 86 | + }, |
| 87 | + "threshold": { |
| 88 | + "value": { |
| 89 | + "double_value": 2 |
| 90 | + } |
| 91 | + } |
| 92 | + }, |
| 93 | + "id": "[UUID]", |
| 94 | + "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources", |
| 95 | + "query_text": "select 2", |
| 96 | + "schedule": { |
| 97 | + "quartz_cron_schedule": "44 19 */1 * * ?", |
| 98 | + "timezone_id": "Europe/Amsterdam" |
| 99 | + }, |
| 100 | + "url": "[DATABRICKS_URL]/sql/alerts-v2/[UUID]?o=[NUMID]", |
| 101 | + "warehouse_id": "aaaaaaaaaaaaaaaa" |
| 102 | + } |
| 103 | + }, |
| 104 | + "pipelines": { |
| 105 | + "my_pipeline": { |
| 106 | + "channel": "CURRENT", |
| 107 | + "deployment": { |
| 108 | + "kind": "BUNDLE", |
| 109 | + "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json" |
| 110 | + }, |
| 111 | + "edition": "ADVANCED", |
| 112 | + "id": "[UUID]", |
| 113 | + "libraries": [ |
| 114 | + { |
| 115 | + "file": { |
| 116 | + "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/foo.py" |
| 117 | + } |
| 118 | + } |
| 119 | + ], |
| 120 | + "name": "test-pipeline", |
| 121 | + "url": "[DATABRICKS_URL]/pipelines/[UUID]?o=[NUMID]" |
| 122 | + } |
| 123 | + }, |
| 124 | + "schemas": { |
| 125 | + "my_schema": { |
| 126 | + "catalog_name": "main", |
| 127 | + "comment": "COMMENT1", |
| 128 | + "id": "main.test-schema", |
| 129 | + "name": "test-schema", |
| 130 | + "url": "[DATABRICKS_URL]/explore/data/main/test-schema?o=[NUMID]" |
| 131 | + } |
| 132 | + }, |
| 133 | + "sql_warehouses": { |
| 134 | + "my_sql_warehouse": { |
| 135 | + "auto_stop_mins": 120, |
| 136 | + "cluster_size": "X-Large", |
| 137 | + "enable_photon": true, |
| 138 | + "enable_serverless_compute": true, |
| 139 | + "id": "[UUID]", |
| 140 | + "max_num_clusters": 1, |
| 141 | + "name": "test-sql-warehouse", |
| 142 | + "spot_instance_policy": "COST_OPTIMIZED", |
| 143 | + "url": "[DATABRICKS_URL]/sql/warehouses/[UUID]?o=[NUMID]" |
| 144 | + } |
| 145 | + } |
| 146 | +} |
81 | 147 |
|
82 | | -The argument "evaluation" is required, but no definition was found. |
| 148 | +=== Expecting all resources to have modified_status=deleted |
| 149 | +>>> [CLI] bundle summary -o json |
| 150 | +{ |
| 151 | + "alerts": { |
| 152 | + "my_alert": { |
| 153 | + "id": "[UUID]", |
| 154 | + "modified_status": "deleted", |
| 155 | + "url": "[DATABRICKS_URL]/sql/alerts-v2/[UUID]?o=[NUMID]" |
| 156 | + } |
| 157 | + }, |
| 158 | + "pipelines": { |
| 159 | + "my_pipeline": { |
| 160 | + "id": "[UUID]", |
| 161 | + "modified_status": "deleted", |
| 162 | + "url": "[DATABRICKS_URL]/pipelines/[UUID]?o=[NUMID]" |
| 163 | + } |
| 164 | + }, |
| 165 | + "schemas": { |
| 166 | + "my_schema": { |
| 167 | + "id": "main.test-schema", |
| 168 | + "modified_status": "deleted", |
| 169 | + "url": "[DATABRICKS_URL]/explore/data/main/test-schema?o=[NUMID]" |
| 170 | + } |
| 171 | + }, |
| 172 | + "sql_warehouses": { |
| 173 | + "my_sql_warehouse": { |
| 174 | + "id": "[UUID]", |
| 175 | + "modified_status": "deleted", |
| 176 | + "url": "[DATABRICKS_URL]/sql/warehouses/[UUID]?o=[NUMID]" |
| 177 | + } |
| 178 | + } |
| 179 | +} |
83 | 180 |
|
84 | | -Error: Missing required argument |
| 181 | +>>> [CLI] bundle destroy --auto-approve |
| 182 | +The following resources will be deleted: |
| 183 | + delete resources.alerts.my_alert |
| 184 | + delete resources.pipelines.my_pipeline |
| 185 | + delete resources.schemas.my_schema |
| 186 | + delete resources.sql_warehouses.my_sql_warehouse |
85 | 187 |
|
86 | | - on bundle.tf.json line 22, in resource.databricks_alert_v2.my_alert: |
87 | | - 22: } |
| 188 | +This action will result in the deletion of the following UC schemas. Any underlying data may be lost: |
| 189 | + delete resources.schemas.my_schema |
88 | 190 |
|
89 | | -The argument "schedule" is required, but no definition was found. |
| 191 | +This action will result in the deletion of the following Lakeflow Declarative Pipelines along with the |
| 192 | +Streaming Tables (STs) and Materialized Views (MVs) managed by them: |
| 193 | + delete resources.pipelines.my_pipeline |
90 | 194 |
|
| 195 | +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default |
91 | 196 |
|
| 197 | +Deleting files... |
| 198 | +Destroy complete! |
92 | 199 |
|
93 | | -Exit code: 1 |
| 200 | +>>> [CLI] bundle summary -o json |
| 201 | +{} |
0 commit comments