Describe the issue
Since CLI v0.264.2 terraform plan fails when interacting with Databricks. It fails during a terraform plan command with the following error:
Error: cannot read metastores: cannot read data metastores: failed during request visitor: default auth: databricks-cli: cannot get access token: Error: cache: token not found.
This suddenly happened after upgrade from v0.262.0 which worked fine.
Steps to reproduce the behavior
- The error van be reproduced from both Azure DevOps pipeline or locally
- Init terraform using a storage account back-end configuration (init command is working fine)
RESOURCE_GROUP_NAME="rg-tfstate"
STORAGE_ACCOUNT_NAME=""
SUBSCRIPTION_ID=""
CONTAINER_NAME="tfstate"
STATE_KEY="terraform.tfstate"
execute az login to your tenant
az account set -s "$SUBSCRIPTION_ID"
Initialize Terraform
terraform init -reconfigure
-backend-config="resource_group_name=$RESOURCE_GROUP_NAME"
-backend-config="storage_account_name=$STORAGE_ACCOUNT_NAME"
-backend-config="container_name=$CONTAINER_NAME"
-backend-config="key=$STATE_KEY"
-
Execute terraform plan command
terraform plan -out test.tfplan
-
See error### Expected Behavior
Clear and concise description of what should have happened
Error: cannot read metastores: cannot read data metastores: failed during request visitor: default auth: databricks-cli: cannot get access token: Error: cache: token not found.
The error was resolved by adding this env variable:
export DATABRICKS_AUTH_TYPE=azure-cli
Actual Behavior
Clear and concise description of what actually happened
OS and CLI version
OS: Ubuntu 24.04.2 LTS
CLI v0.264.2
Is this a regression?
Did this work in a previous version of the CLI? If so, which versions did you try?
Yes works in previous version (env variable is not needed).
Describe the issue
Since CLI v0.264.2 terraform plan fails when interacting with Databricks. It fails during a terraform plan command with the following error:
Error: cannot read metastores: cannot read data metastores: failed during request visitor: default auth: databricks-cli: cannot get access token: Error: cache: token not found.
This suddenly happened after upgrade from v0.262.0 which worked fine.
Steps to reproduce the behavior
RESOURCE_GROUP_NAME="rg-tfstate"
STORAGE_ACCOUNT_NAME=""
SUBSCRIPTION_ID=""
CONTAINER_NAME="tfstate"
STATE_KEY="terraform.tfstate"
execute az login to your tenant
az account set -s "$SUBSCRIPTION_ID"
Initialize Terraform
terraform init -reconfigure
-backend-config="resource_group_name=$RESOURCE_GROUP_NAME"
-backend-config="storage_account_name=$STORAGE_ACCOUNT_NAME"
-backend-config="container_name=$CONTAINER_NAME"
-backend-config="key=$STATE_KEY"
Execute terraform plan command
terraform plan -out test.tfplan
See error### Expected Behavior
Clear and concise description of what should have happened
Error: cannot read metastores: cannot read data metastores: failed during request visitor: default auth: databricks-cli: cannot get access token: Error: cache: token not found.
The error was resolved by adding this env variable:
export DATABRICKS_AUTH_TYPE=azure-cli
Actual Behavior
Clear and concise description of what actually happened
OS and CLI version
OS: Ubuntu 24.04.2 LTS
CLI v0.264.2
Is this a regression?
Did this work in a previous version of the CLI? If so, which versions did you try?
Yes works in previous version (env variable is not needed).