databricks-cli/bundle/deploy
shreyas-goenka e6241e196f
Move to a single prompt during bundle destroy (#1583)
## Changes
Right now we ask users for two confirmations when destroying a bundle.
One to destroy the resources and one to delete the files. This PR
consolidates the two prompts into one.

## Tests
Manually

Destroying a bundle with no resources:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: y
No resources to destroy
Updating deployment state...
Deleting files...
Destroy complete!
```

Destroying a bundle with no remote state:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
No active deployment found to destroy!
```

When a user cancells a deployment:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
The following resources will be deleted:
  delete job job_1
  delete job job_2
  delete pipeline foo

All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: n
Destroy cancelled!
```

When a user destroys resources:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
The following resources will be deleted:
  delete job job_1
  delete job job_2
  delete pipeline foo

All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: y
Updating deployment state...
Deleting files...
Destroy complete!
```
2024-07-24 13:02:19 +00:00
..
files Move to a single prompt during bundle destroy (#1583) 2024-07-24 13:02:19 +00:00
lock Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
metadata Annotate DLT pipelines when deployed using DABs (#1410) 2024-05-01 08:37:03 +00:00
terraform Move to a single prompt during bundle destroy (#1583) 2024-07-24 13:02:19 +00:00
filer.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
state.go Add UUID to uniquely identify a deployment state (#1595) 2024-07-16 10:01:58 +00:00
state_pull.go Use `vfs.Path` for filesystem interaction (#1554) 2024-07-03 10:13:22 +00:00
state_pull_test.go Use `vfs.Path` for filesystem interaction (#1554) 2024-07-03 10:13:22 +00:00
state_push.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
state_push_test.go Move path field to bundle type (#1316) 2024-03-27 09:03:24 +00:00
state_test.go Use `vfs.Path` for filesystem interaction (#1554) 2024-07-03 10:13:22 +00:00
state_update.go Add UUID to uniquely identify a deployment state (#1595) 2024-07-16 10:01:58 +00:00
state_update_test.go Add UUID to uniquely identify a deployment state (#1595) 2024-07-16 10:01:58 +00:00