Skip to content

Instantly share code, notes, and snippets.

@jesseloudon
Created April 27, 2025 11:28
Show Gist options
  • Save jesseloudon/ca04e504ce69dfc98c377e5ab83c3a4d to your computer and use it in GitHub Desktop.
Save jesseloudon/ca04e504ce69dfc98c377e5ab83c3a4d to your computer and use it in GitHub Desktop.
json_file="workspace-ip-access-lists/${{ parameters.BUNDLE_TARGET }}.json"
jq -c '.[]' "$json_file" | while IFS= read -r json_object_delete; do
operation=$(echo $json_object_delete | jq -r '.operation')
ip_access_list_id=$(echo $json_object_delete | jq -r '.ip_access_list_id')
if [[ ${operation,,} == "delete"* ]]; then
echo "Deleting specified Databricks IP Access List: $json_object_delete"
databricks ip-access-lists delete "$ip_access_list_id" -t "${{ parameters.BUNDLE_TARGET }}" --log-level "${{ parameters.DATABRICKS_LOG_LEVEL }}" || true
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment