Skip to content

[ISSUE] Issue with databricks_library resource - Error: failed to find the installed library #5464

@ltutar

Description

@ltutar

Configuration

databricks_maven_libraries = {
  "snowflake-package-1" : "net.snowflake:spark-snowflake_2.12:3.1.0",
  "snowflake-package-2" : "net.snowflake:snowflake-jdbc:3.19.0"
}

resource "databricks_library" "maven_libraries" {
  for_each   = var.databricks_maven_libraries
  cluster_id = databricks_cluster.compass_databricks_cluster.id

  maven {
    coordinates = each.value
  }
  provider = databricks.databricks_ws

  depends_on = [databricks_cluster.compass_databricks_cluster]
}

Expected Behavior

I expected terraform to install the library if it is not available.

Actual Behavior

Terraform fails with the message: "• Error: failed to find the installed library" and I have to manually install the library with the Databricks UI.

Steps to Reproduce

Remove the library with the UI.
  1. Run terraform plan and apply

Terraform and provider versions

terraform {
  required_providers {
    azapi = {
      source  = "azure/azapi"
      version = "2.8.0"
    }
    azurecaf = {
      source  = "aztfmod/azurecaf"
      version = "1.2.31"
    }
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "4.62.1"
    }
    databricks = {
      source  = "databricks/databricks"
      version = "= 1.110.0"
    }
  }
  required_version = "1.14.3"
}

Is it a regression?

Debug Output

Important Factoids

Would you like to implement a fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions