-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE] Azure authentication stopped working with azurerm v2.71.0+ #781
Comments
Have you looked through behavior changes documented in changelog? |
That's always the first place I look and I did not see anything obvious. There have not been any added since v0.3.4 and this ran successfully with v0.3.6. This is recent breakage. The error was first seen in our Azure DevOps pipeline that deploys / manages our workspace. To debug the issue, I ran our terraform automation locally with the same results. When running in the Azure DevOps pipeline it is using a service principal to authenticate and when running locally it is using my personal azure active directory credentials via the azure cli (az login). When running locally I switched to using a databricks PAT and it started working but we need our automation to use the service principal. |
It's interesting. I really thought that it's caused by this one, introduced in 0.3.6:
but it was running with 0.3.6, then it's something else. So we need to look what could be wrong there. |
It might be related to Google OIDC authorizer then, which was added in 0.3.7 Rollback to 0.3.6, for now |
@mark-greene please run TF_LOG=DEBUG terraform apply to enable debug mode through the TF_LOG environment variable. Look specifically for "Explicit and implicit attributes" lines, that should indicate authentication attributes used. Please paste those here |
Interesting. I just retested 0.3.7 with SPN auth (with AAD & PAT), and also AZCLI authentication - it works for me. For SPN auth you should see
For SPN auth with PAT you should see:
|
@nfx Here is the output of the plan. It is failing on the plan so I'm not trying an apply. It is not showing any output like @alexott mentioned.
Again I can get a plan to work with methods 1,2 and 5 (databricks), just not with 3 or 4 (azure). I have tried it both with explicit and implicit Azure credentials.
|
Please send us debug logs (with |
potential root causes are: hashicorp/terraform-provider-azurerm#12543 |
// cc @tombuildsstuff |
researching those things now |
With the release of hashicorp/azurerm v2.73.0 everything is now working as expected. |
I'll improve error reporting in the next release and it'll contain field/env variable names. |
Terraform Version
terraform v1.04
databricks v0.3.7
azurerm v2.71.0+ (works on ≤2.70.0) cc @favoretti
Quick Mitigation: use
azurerm ≤2.70.0
orazurerm >= v2.73.0
Terraform Configuration Files
or another example
Actual Behavior
and logs show
Explicit and implicit attributes: azure_client_id, azure_client_secret, azure_tenant_id
, thoughazure_databricks_workspace_id
is empty, but it should not be empty.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
Important Factoids
Azure methods 3 and 4 were working fine until recently. Now only 1 and 2 are working. I have gone back to v0.3.5 with the same results so I'm guessing this is a change on the Azure side but I'm not positive.
The text
azure_databricks_workspace_id
only appears in the string for this error message, so it would seem that:I hit this issue while trying to upgrade our databricks provider from 0.3.2 to 0.3.7. However, that caused TF to also pull in this upgrade:
And that seems to be the operative change: even if I revert the databricks provider back to 0.3.2, I get this error if I am on the 2.72.0 azurerm, and I don't if I'm on the 2.67.0 azurerm. I did some bisecting, and it seems like it's at 2.71.0 where I get this error. (I don't get it with 2.70.0)
The text was updated successfully, but these errors were encountered: