Databricks Issues
Let's keep track of the different issues we come across with Databricks.
1. context deadline exceeded on 169.254.169.254
This one popped up while trying to Terraform our workspaces using azure msi for authentication.
TLDR: Running Terraform from an Azure VM or Azure DevOps pipeline agent should solve it.
Error:
Error: cannot read group: failed during request visitor: inner token: token request: Get "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&client_id=0a000000-a0a0-0aa0-a0a0-0a0a0aa0aa00&resource=0aa0a0a0-0a00-0aa0-a0a0-a0a0a0a0a0a0": context deadline exceeded
Root Cause:
Terraform attempts to authenticate to Azure using a Managed Identity, but fails to reach the Azure Instance Metadata Service (IMDS) endpoint (169.254.169.254), which is only accessible from within an Azure-hosted environment (e.g., virtual machines or hosted agents).
Resolution:
Ensure Terraform is being executed within an Azure hosted environment. Running Terraform from a local machine or outside Azure will not allow access to IMDS, and the MSI flow will fail. Running the same Terraform configuration from an Azure VM or pipeline agent should resolve this issue.