The following bicep deployment has suddenly started failing and I do not understand why
var managedResourceGroupName = 'rg-metadata-${dataBricksName}'
resource databrickworkspace 'Microsoft.Databricks/workspaces@2018-04-01' = {
name: dataBrickName
location: location
sku: {
name: dataBrickPricingTier
}
properties: {
managedResourceGroupId: managedResourceGroup.id
parameters: {
enableNoPublicIp: {
value: disablePublicIp
}
}
}
}
resource managedResourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' existing = {
scope: subscription()
name: managedResourceGroupName
}
This pretty much follows the same doc : here.
The error message I get is
The filter 'principalId eq ''' is not supported. Supported filters are either 'atScope()' or 'principalId eq '{value}' or assignedTo('{value}')
This error message is quite cyrptic and does not tell me much. Also, this has been succeeding so far. The problem has started now.
Looking at the full doc here , I can see it has things like
It says required, but the definition isn’t clear as to what do I have to put there. I have never had to use the principalId so far, during the creation of a databricks workspace.
Another fun fact is: the deletion of the resource (databricks workspace which is anyways in a failed state), does not go through and fails too or gets stuck.
2
Answers
I raised a MS Support case for this, as I ended up spending a lot of hours on it. Also, it wasn't something wrong that I was doing- especially because it worked in the past and also, that the same bicep worked flawlessly the next morning.
MS supporthave acknowledged it was a service failure (details below). So, if some of you encounter these cryptic errors and have no idea, what could be going wrong, raise a support case.
By referring to the same MSDoc provided by you, I tried deploying databricks with workspace in my environment and was able to deploy it successfully.
Deployment succeeded:
When I open the
JSON
view of the deployed resource, it displays theprovisioningstate
as successful with the specifiedprincipalId
. In addition to thedatabricks
account, the above bicep code generates a managed resource group, which includes anidentity
and theservice principal
details. Only at this page, theservice principal
details can be viewed.Json view:
Path to view the service principal details:
And
Regarding the resource’s deletion, it’s probably that it’s stuck in a failed state, preventing it from being destroyed. You can see if removing the resource group that contains the resource solves the issue.
Note: Verify the managed resource group name from the document and provide in your code correctly. Sometimes the variable names also create a conflict for deployment.
For more information: Refer Databricks service principal document