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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_databricks_workspace workspace_url and workspace_id are empty. #11418
Comments
Hi there and thank you for reporting this. From your plan output I see that your workspace will have to be re-created, which can happen if initial deployment has failed. I've ran some local tests, I do not see the behavior you're describing. Are you sure that the workspace that you got deployed is not in a |
So you're correct but I was incorrect in assuming successful terraform output meant all resources were created. This is the output from my apply 馃 => date ; terraform apply -var-file=../variables.tfvars -auto-approve
Thu Apr 22 07:09:39 EDT 2021
azurerm_data_factory.primary-data_factory: Creating...
azurerm_logic_app_workflow.logic-app-1: Creating...
azurerm_databricks_workspace.databricks: Creating...
azurerm_logic_app_workflow.logic-app-1: Creation complete after 2s [id=/subscriptions/subscription/resourceGroups/resource-group/providers/Microsoft.Logic/workflows/agency-dts-dev-logic-app-1]
azurerm_data_factory.primary-data_factory: Creation complete after 3s [id=/subscriptions/subscription/resourceGroups/resource-group/providers/Microsoft.DataFactory/factories/agency-dts-dev-df]
azurerm_databricks_workspace.databricks: Still creating... [10s elapsed]
azurerm_databricks_workspace.databricks: Still creating... [20s elapsed]
azurerm_databricks_workspace.databricks: Still creating... [30s elapsed]
azurerm_databricks_workspace.databricks: Still creating... [40s elapsed]
azurerm_databricks_workspace.databricks: Creation complete after 48s [id=/subscriptions/subscription/resourceGroups/resource-group/providers/Microsoft.Databricks/workspaces/agency-dts-dev-adb]
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Outputs:
data_factory_name = "idoc-dts-dev-df"
databricks_domain_url = "https:///"
databricks_id = "/subscriptions/subscription/resourceGroups/resource-group/providers/Microsoft.Databricks/workspaces/agency-dts-dev-adb"
databricks_workspace_id = "" However, looking at the resource with the azure cli: 馃彆 => az databricks workspace list --query [].[id,name,provisioningState] -o json
[
[
"/subscriptions/subscription/resourceGroups/resource-group/providers/Microsoft.Databricks/workspaces/agency-dts-dev-adb",
"agency-dts-dev-adb",
"Failed"
]
] So I guess my question now becomes, why does the Azure SDK or terraform believe this was created successfully? I ran the apply in debug and found 2021-04-22T07:25:11.539-0400 [DEBUG] provider.terraform-provider-azurerm_v2.56.0_x5: {"status":"Failed","error":{"code":"SubnetMissingNSG","message":"The subnet 'agency-dts-dev-private-subnet-1' doesn't have a network security group attached to it. Please create and attach an empty network security group"}} So it seems that the workspace never gave any indication that it was successful, but the output suggests it to be so. |
I've been facing the same issue for the past hour. Thanks @jwshive, running the debug like you did help me to find this:
I think the azurerm_databricks_workspace resource is not handling error received from Azure API. |
RTFM :) o.. there is none (at least I cannot find it in Azure docs).. Gladly there is side note about this kind of issue: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace#managed_resource_group_name - it worked as a charm for me. TL;DR: Define UNIQUE managed resource group name if you have (or plan) other databricks workspace in that resource group. |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
Terraform v0.15.0
provider registry.terraform.io/hashicorp/azurerm v2.56.0
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
I expect to be shown a workspace_id and a workspace_url for a newly created databricks workspace.
Actual Behaviour
The outputs are empty
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: