Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bundle:
name: secret-scope-basic-$UNIQUE_NAME

resources:
secret_scopes:
first:
name: test-scope-1-$UNIQUE_NAME
backend_type: "DATABRICKS"
second: # DELETE
name: test-scope-2-$UNIQUE_NAME # DELETE
backend_type: "DATABRICKS" # DELETE
permissions: # DELETE
- user_name: $CURRENT_USER_NAME # DELETE
level: MANAGE # DELETE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

>>> print_requests.py ^//import-file/ ^//workspace/ ^//telemetry-ext
{
"method": "POST",
"path": "/api/2.0/secrets/scopes/delete",
"body": {
"scope": "test-scope-2-[UNIQUE_NAME]"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

>>> print_requests.py ^//import-file/ ^//workspace/ ^//telemetry-ext
{
"method": "POST",
"path": "/api/2.0/secrets/acls/delete",
"body": {
"principal": "[USERNAME]",
"scope": "test-scope-2-[UNIQUE_NAME]"
}
}
{
"method": "POST",
"path": "/api/2.0/secrets/scopes/delete",
"body": {
"scope": "test-scope-2-[UNIQUE_NAME]"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

>>> [CLI] bundle plan
delete secret_scopes.second
delete secret_scopes.second.permissions

Plan: 0 to add, 0 to change, 2 to delete, 2 unchanged
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

>>> [CLI] bundle plan
delete secret_scopes.second

Plan: 0 to add, 0 to change, 1 to delete, 1 unchanged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

=== create the secret scope
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/secret-scope-basic-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/secret-scope-basic-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> [CLI] bundle destroy --auto-approve
The following resources will be deleted:
delete resources.secret_scopes.first

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/secret-scope-basic-[UNIQUE_NAME]/default

Deleting files...
Destroy complete!
18 changes: 18 additions & 0 deletions acceptance/bundle/resources/secret_scopes/delete_scope/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
envsubst < databricks.yml.tmpl > databricks.yml

cleanup() {
trace $CLI bundle destroy --auto-approve
rm out.requests.txt
}
trap cleanup EXIT

title "create the secret scope"
trace $CLI bundle deploy

grep -v DELETE < databricks.yml > databricks.yml.tmp && mv databricks.yml.tmp databricks.yml

trace $CLI bundle plan &> out.plan.$DATABRICKS_BUNDLE_ENGINE.txt
rm out.requests.txt

trace $CLI bundle deploy
trace print_requests.py '^//import-file/' '^//workspace/' '^//telemetry-ext' &> out.deploy.requests.$DATABRICKS_BUNDLE_ENGINE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Cloud = true
Local = true
RecordRequests = true