databricks bundle deploy fails on U2M authentication
kampfhamster83 opened this issue · 6 comments
Describe the issue
databricks bundle deploy
fails on U2M authentication
For information:
Personal access token and M2M authentication works fine.
Configuration
Please provide a minimal reproducible configuration for the issue
Steps to reproduce the behavior
- Run
databricks auth login --host https://xxx.azuredatabricks.net
- Run
databricks bundle init
(default setting with just a sample notebook inside) - Run
databricks bundle validate
- Run
databricks bundle deploy -t dev
- See error:
PS C:\dev\other\testbundle> databricks bundle deploy -t dev
Uploading bundle files to /Users/xxx@xxx.com/.bundle/testbundle/dev/files...
Deploying resources...
Updating deployment state...
Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
Expected Behavior
Deployment succeeds... notebooks are copied and job is created
Actual Behavior
Deployment fails, when trying to create the job.
Deployment succeds, when excluding job/ressources in the databricks.yml-file.
OS and CLI version
OS: Windows 11/10
Databricks CLI: v0.214.0
Is this a regression?
We tried the the versions from v0.212.0 until the most current.
Debug Logs
...
14:53:17 DEBUG POST /api/2.0/workspace-files/import-file/Users/xxx@xxx.com/.bundle/testbundle/dev/state/metadata.json?overwrite=true
> {
> "config": {
> "bundle": {
> "git": {
> "bundle_root_path": "."
> }
> },
> "resources": {
> "jobs": {
> "testbundle_job": {
> "relative_path": "resources/testbundle_job.yml"
> }
> }
> },
> "workspace": {
> "file_path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/files"
> }
> },
> "version": 1
> }
< HTTP/2.0 200 OK pid=27312 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=metadata.Upload sdk=true
14:53:17 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=27312 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred
14:53:17 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
...
Could you please try to run databricks bundle deploy -t dev --log-level TRACE
? Thanks!
Of course, thanks for your reaction, andrew!
Here is the full trace log:
(because of the client, I have to remove some identifiers... but everything else is unchanged)
16:56:39 INFO start pid=12772 version=0.214.0 args="C:\\Tools\\databricks\\databricks.exe, bundle, deploy, -t, dev, --log-level, trace"
16:56:39 DEBUG Loading bundle configuration from: C:\dev\other\testbundle\databricks.yml pid=12772
16:56:39 DEBUG Apply pid=12772 mutator=seq
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=scripts.preinit
16:56:39 DEBUG No script defined for preinit, skipping pid=12772 mutator=seq mutator=scripts.preinit
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=ProcessRootIncludes
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=ProcessRootIncludes mutator=seq
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=ProcessRootIncludes mutator=seq mutator=ProcessInclude(resources\testbundle_job.yml)
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=EnvironmentsToTargets
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=InitializeVariables
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=DefineDefaultTarget(default)
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=LoadGitDetails
16:56:39 DEBUG Apply pid=12772 mutator=SelectTarget(dev)
16:56:39 DEBUG Apply pid=12772 mutator=<func>
16:56:39 DEBUG Apply pid=12772 mutator=<func>
16:56:39 DEBUG Apply pid=12772 mutator=seq
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize
16:56:39 INFO Phase: initialize pid=12772 mutator=seq mutator=initialize
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=RewriteSyncPaths
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=MergeJobClusters
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=MergeJobTasks
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=MergePipelineClusters
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=InitializeWorkspaceClient
16:56:39 TRACE Loading config via environment pid=12772 sdk=true
16:56:39 TRACE Loading config via resolve-profile-from-host pid=12772 sdk=true
16:56:39 TRACE section DEFAULT: error when getting key of section "DEFAULT": key "host" not exists pid=12772
16:56:39 DEBUG Loading profile adb-xxx because of host match pid=12772
16:56:39 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=PopulateCurrentUser
16:56:39 TRACE Loading config via environment pid=12772 sdk=true
16:56:39 TRACE Loading config via resolve-profile-from-host pid=12772 sdk=true
16:56:39 TRACE section DEFAULT: error when getting key of section "DEFAULT": key "host" not exists pid=12772
16:56:39 DEBUG Loading profile adb-xxx because of host match pid=12772
16:56:39 INFO Ignoring pat auth, because databricks-cli is preferred pid=12772 sdk=true
16:56:39 INFO Ignoring basic auth, because databricks-cli is preferred pid=12772 sdk=true
16:56:39 INFO Ignoring oauth-m2m auth, because databricks-cli is preferred pid=12772 sdk=true
16:56:39 TRACE Attempting to configure auth: databricks-cli pid=12772 sdk=true
16:56:39 INFO Refreshed OAuth token from Databricks CLI, expires on 2024-02-22 17:11:33.4362775 +0100 CET pid=12772 sdk=true
16:56:39 DEBUG Using Databricks CLI authentication with Databricks OAuth tokens pid=12772 sdk=true
16:56:39 INFO Refreshed OAuth token from Databricks CLI, expires on 2024-02-22 17:11:33.4362775 +0100 CET pid=12772 sdk=true
16:56:40 DEBUG GET /api/2.0/preview/scim/v2/Me
< HTTP/2.0 200 OK
< {
< "active": true,
< "displayName": "xxx xxx",
< "emails": [
< {
< "primary": true,
< "type": "work",
< "value": "xxx@xxx.com"
< }
< ],
< "externalId": "b4828c7d-9aef-4f6a-b4d2-92c1e8b3f1a7",
< "groups": [
< {
< "$ref": "Groups/641901251884340",
< "display": "admins",
< "type": "direct",
< "value": "641901251884340"
< }
< ],
< "id": "2693741782059971",
< "name": {
< "familyName": "xxx",
< "givenName": "xxx"
< },
< "schemas": [
< "urn:ietf:params:scim:schemas:core:2.0:User",
< "urn:ietf:params:scim:schemas:extension:workspace:2.0:User"
< ],
< "userName": "xxx@xxx.com"
< } pid=12772 mutator=seq mutator=initialize mutator=seq mutator=PopulateCurrentUser sdk=true
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=DefineDefaultWorkspaceRoot
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ExpandWorkspaceRoot
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=DefaultWorkspacePaths
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=SetVariables
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ResolveResourceReferences
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ResolveVariableReferences
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=SetRunAs
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=OverrideCompute
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ProcessTargetMode
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ExpandPipelineGlobPaths
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=TranslatePaths
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=PythonWrapperWarning
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=ApplyBundlePermissions
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=metadata.AnnotateJobs
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=terraform.Initialize
16:56:40 DEBUG Using Terraform at C:\dev\other\testbundle\.databricks\bundle\dev\bin\terraform.exe pid=12772 mutator=seq
mutator=initialize mutator=seq mutator=terraform.Initialize
16:56:40 DEBUG Environment variables for Terraform: DATABRICKS_CLI_PATH, DATABRICKS_AUTH_TYPE, USERPROFILE, PATH, TMP, DATABRICKS_HOST pid=12772 mutator=seq mutator=initialize mutator=seq mutator=terraform.Initialize
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=initialize mutator=seq mutator=scripts.postinit
16:56:40 DEBUG No script defined for postinit, skipping pid=12772 mutator=seq mutator=initialize mutator=seq mutator=scripts.postinit
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build
16:56:40 INFO Phase: build pid=12772 mutator=seq mutator=build
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=scripts.prebuild
16:56:40 DEBUG No script defined for prebuild, skipping pid=12772 mutator=seq mutator=build mutator=seq mutator=scripts.prebuild
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.DetectPackages
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.DetectPackages mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.DetectPackages mutator=seq mutator=artifacts.whl.AutoDetect
16:56:40 INFO No local wheel tasks in databricks.yml config, skipping auto detect pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.DetectPackages mutator=seq mutator=artifacts.whl.AutoDetect
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.DetectPackages mutator=seq mutator=artifacts.whl.DefineArtifactsFromLibraries
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.inferAll
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.inferAll mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.BuildAll
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=artifacts.BuildAll mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=scripts.postbuild
16:56:40 DEBUG No script defined for postbuild, skipping pid=12772 mutator=seq mutator=build mutator=seq mutator=scripts.postbuild
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=build mutator=seq mutator=ResolveVariableReferences
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=deploy
16:56:40 INFO Phase: deploy pid=12772 mutator=seq mutator=deploy
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=scripts.predeploy
16:56:40 DEBUG No script defined for predeploy, skipping pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=scripts.predeploy
16:56:40 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=lock:acquire
16:56:40 INFO Acquiring deployment lock (force: false) pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=lock:acquire
16:56:41 DEBUG POST /api/2.0/workspace-files/import-file/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock?overwrite=false
> {
> "AcquisitionTime": "2024-02-22T16:56:40.4083789+01:00",
> "ID": "a7f3e1d9-8b42-4c6c-ae0f-61a8c9b5d2e2",
> "IsForced": false,
> "User": "xxx@xxx.com"
> }
< HTTP/2.0 200 OK pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=lock:acquire sdk=true
16:56:41 DEBUG GET /api/2.0/workspace/get-status?path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock
< HTTP/2.0 200 OK
< {
< "created_at": 1708617401550,
< "modified_at": 1708617401550,
< "object_id": 3489990938861616,
< "object_type": "FILE",
< "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock",
< "resource_id": "3489990938861616"
< } pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=lock:acquire sdk=true
16:56:41 DEBUG GET /api/2.0/workspace/export?direct_download=true&path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock
< HTTP/2.0 200 OK
< <Streaming response> pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=lock:acquire sdk=true
16:56:41 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred
16:56:41 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq
16:56:41 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform:state-pull
16:56:41 INFO Opening remote state file pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform:state-pull
16:56:41 DEBUG GET /api/2.0/workspace/get-status?path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/terraform.tfstate
< HTTP/2.0 200 OK
< {
< "created_at": 1708614803244,
< "modified_at": 1708614803244,
< "object_id": 1436656098399562,
< "object_type": "FILE",
< "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/state/terraform.tfstate",
< "resource_id": "1436656098399562"
< } pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform:state-pull sdk=true
16:56:42 DEBUG GET /api/2.0/workspace/export?direct_download=true&path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/terraform.tfstate
< HTTP/2.0 200 OK
< <Streaming response> pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform:state-pull sdk=true
16:56:42 INFO Local state is the same or newer, ignoring remote state pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform:state-pull
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=check-running-resources
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=ValidateGitDetails
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=libraries.MatchWithArtifacts
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=artifacts.CleanUp
16:56:42 DEBUG POST /api/2.0/workspace/delete
> {
> "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/artifacts/.internal",
> "recursive": true
> }
< HTTP/2.0 200 OK
< {} pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=artifacts.CleanUp
sdk=true
16:56:42 DEBUG POST /api/2.0/workspace/mkdirs
> {
> "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/artifacts/.internal"
> }
< HTTP/2.0 200 OK
< {} pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=artifacts.CleanUp
sdk=true
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=artifacts.UploadAll
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=artifacts.UploadAll mutator=seq
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=If
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=If mutator=NoOp
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=files.Upload
Uploading bundle files to /Users/xxx@xxx.com/.bundle/testbundle/dev/files...
16:56:42 DEBUG GET /api/2.0/workspace/get-status?path=/Users/xxx@xxx.com/.bundle/testbundle/dev/files
< HTTP/2.0 200 OK
< {
< "object_id": 1436656098399546,
< "object_type": "DIRECTORY",
< "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/files",
< "resource_id": "1436656098399546"
< } pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=files.Upload sdk=true
16:56:42 DEBUG Path /Users/xxx@xxx.com/.bundle/testbundle/dev/files has type directory (ID: 1436656098399546) pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=files.Upload
16:56:42 INFO Uploaded bundle files pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=files.Upload
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=ApplyWorkspaceRootPermissions
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform.Interpolate
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=terraform.Write
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred
16:56:42 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=terraform.Apply
Deploying resources...
16:56:50 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=terraform.Apply
16:56:50 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq
16:56:50 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=terraform:state-push
Updating deployment state...
16:56:50 INFO Writing local state file to remote state directory pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=terraform:state-push
16:56:50 DEBUG POST /api/2.0/workspace-files/import-file/Users/xxx@xxx.com/.bundle/testbundle/dev/state/terraform.tfstate?overwrite=true
> {
> "check_results": null,
> "lineage": "c1e9f8a3-7d46-4b20-bb55-6a93e2d1f874",
> "outputs": {},
> "resources": null,
> "serial": 1,
> "terraform_version": "1.5.5",
> "version": 4
> }
< HTTP/2.0 200 OK pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=terraform:state-push sdk=true
16:56:50 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=terraform.Load
16:56:51 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=metadata.Compute
16:56:51 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=metadata.Upload
16:56:52 DEBUG POST /api/2.0/workspace-files/import-file/Users/xxx@xxx.com/.bundle/testbundle/dev/state/metadata.json?overwrite=true
> {
> "config": {
> "bundle": {
> "git": {
> "bundle_root_path": "."
> }
> },
> "resources": {
> "jobs": {
> "testbundle_job": {
> "relative_path": "resources/testbundle_job.yml"
> }
> }
> },
> "workspace": {
> "file_path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/files"
> }
> },
> "version": 1
> }
< HTTP/2.0 200 OK pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred mutator=seq mutator=metadata.Upload sdk=true
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq mutator=deferred
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=seq
16:56:52 DEBUG Apply pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release
16:56:52 INFO Releasing deployment lock pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release
16:56:52 DEBUG GET /api/2.0/workspace/get-status?path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock
< HTTP/2.0 200 OK
< {
< "created_at": 1708617401550,
< "modified_at": 1708617401550,
< "object_id": 3489990938861616,
< "object_type": "FILE",
< "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock",
< "resource_id": "3489990938861616"
< } pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release sdk=true
16:56:52 DEBUG GET /api/2.0/workspace/get-status?path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock
< HTTP/2.0 200 OK
< {
< "created_at": 1708617401550,
< "modified_at": 1708617401550,
< "object_id": 3489990938861616,
< "object_type": "FILE",
< "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock",
< "resource_id": "3489990938861616"
< } pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release sdk=true
16:56:52 DEBUG GET /api/2.0/workspace/export?direct_download=true&path=/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock
< HTTP/2.0 200 OK
< <Streaming response> pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release sdk=true
16:56:52 DEBUG POST /api/2.0/workspace/delete
> {
> "path": "/Users/xxx@xxx.com/.bundle/testbundle/dev/state/deploy.lock"
> }
< HTTP/2.0 200 OK
< {} pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred mutator=lock:release sdk=true
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq mutator=deferred
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq mutator=seq
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy mutator=seq
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq mutator=deploy
16:56:52 ERROR Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
pid=12772 mutator=seq
Error: terraform apply: exit status 1
Error: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\Tools\databricks\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH
with databricks_job.testbundle_job,
on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:
59: }
16:56:52 ERROR failed execution pid=12772 exit_code=1 error="terraform apply: exit status 1\n\nError: cannot create job: default auth: cannot configure default credentials, please check https://docs.databricks.com/en/dev-tools/auth.html#databricks-client-unified-authentication to configure credentials for your preferred authentication method. Config: host=https://adb-xxx.azuredatabricks.net, databricks_cli_path=C:\\Tools\\databricks\\databricks.exe. Env: DATABRICKS_HOST, DATABRICKS_CLI_PATH\n\n with databricks_job.testbundle_job,\n on bundle.tf.json line 59, in resource.databricks_job.testbundle_job:\n 59: }\n\n"
Do you have DATABRICKS_AUTH_TYPE env variable set by any chance and if yes, to which value? Does removing it helps?
The auth_type is set in the .databrickscfg
Removing the auth_type
has no effect. The error message is the same.
I tried also putting the host
and auth_type
directly under [DEFAULT]
, but this didn't work too.
; The profile defined in the DEFAULT section is to be used as a fallback when no profile is explicitly specified.
[DEFAULT]
[adb-xxx]
host = https://adb-xxx.azuredatabricks.net
auth_type = databricks-cli
@andrewnester Thank you very much for the solution! Unfortunately I cannot approve the pull request ;-)
I'll check it, when a version with the change is available.
The fix is merged and will be released in 0.214.1 CLI version later today