Open kingnathanal opened 11 months ago
Seeing the same error with databricks cli and a service principal in use on an Azure env.
@hargut Thanks I dont feel crazy anymore. Did this work for you before? Thinking of rolling back to a earlier provider version just to see if it works but it its a little shooting darts to know which version to use.
@kingnathanal Sorry, I've no idea about that as I've not used it like that before. I've also opened a ticket on the cli repo.
Creation with a user token as well works fine with the cli, so it seems to be specific for the service principal.
This is likely an issue with the backing service. I'll raise this issue to the underlying team to see if they can take a look.
Thanks for having a closer look. :+1:
@mgyucht Any updates on this? Thanks
Receiving the same error with Terraform 1.6.6 and databricks/databricks 1.36.1
Given the inclusion of a data resource for storage_credential being added to 1.37.0, I decided to give azurerm_storage_credential another try on 1.37.0, and it still fails with the same error. Terraform 1.6.6
@kingnathanal @wschultz-boxboat just want to check if this is the same issue you're facing - https://github.com/databricks/terraform-provider-databricks/issues/2828#issuecomment-1966424366
@kingnathanal @wschultz-boxboat just want to check if this is the same issue you're facing - #2828 (comment)
@nkvuong it works if the Service Principal is granted Account Admin and the storage credential resource uses an account scoped provider config.
This won't work for my use case though as this service principal operates solely in one Databricks workspace and should not have Account Admin level of permissions.
Is there work on the roadmap to get the Service Principal's permissions to least privilege?
Are there updates on the fix for this issue ?
I can confirm the issue still occurs with version 1.53.0 of the databricks terraform provider, with the workaround of requiring the Managed Identity to be granted Account Admin rights (which is exactly what we'd like to avoid - the MI/SP was already a metastore owner, which should have been enough in our scenario).
@GavWall @antsok it's an UC backend restriction, not the Terraform one - open the support ticket against UC API to solve it.
@alexott I wonder if the support will want to look at the ticket if it is created since the case is documented as unsupported. https://learn.microsoft.com/en-us/azure/databricks/connect/unity-catalog/storage-credentials
My point is that it's not a terraform issue...
Configuration
Expected Behavior
Should be able to create storage credential resource using Service Principal
Actual Behavior
Terraform fails during apply with an error:
Terraform and provider versions
Is it a regression?
Have not tried this with any other version
Debug Output
Important Factoids
My Terraform is normally applied using a Service Principal, but when I change the Databricks provider to use a PAT like below:
I am able to create the storage credential no issues.
I am also able to create other Databricks resources like the Compute Cluster with just the Service Principal also, shown in the configuration above.
The error makes this hard to know if this is a permission issue or an issue with the provider