terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[ISSUE] Issue with `databricks_metastore` resource

Open panselaukik opened this issue 3 years ago • 2 comments

Configuration

terraform {
  required_version = ">=v0.14.7"
}

databricks = {
      source  = "databricks/databricks"
      version = "1.2.0"
}

Expected Behavior

resource "databricks_metastore" "workspace_metastore" {
  name               = var.metastore_name
  storage_root   = var.metastore_bucket_name
  force_destroy = true
}

Create the resource on first apply, next apply should not apply any changes unless if anything made.

Actual Behavior


- Next when you run terraform plan you see below

  ~ resource "databricks_metastore" "workspace_metastore" {
      - delta_sharing_scope = "INTERNAL" -> null
        id = "aabbccdddd"
        name = "abcd"
        # (11 unchanged attributes hidden)
    }

- Once you apply, you get the below error:
       Error: cannot update metastore: UpdateMetastore Nothing to update.

- Third time when you apply, there is no change or issue, and it succeeds

Steps to Reproduce

1. terraform apply
2. terraform plan
3. terraform apply
--> Above fails

Again perform -
1. terraform plan
2. terraform apply
--> This time it succeeds

Terraform and provider versions

terraform {
  required_version = ">=v0.14.7"
}

databricks = {
      source  = "databricks/databricks"
      version = "1.2.0"
}

panselaukik avatar Aug 10 '22 17:08 panselaukik

Potentially, could be mitigated by using default of INTERNAL instead of empty string

alexott avatar Aug 10 '22 17:08 alexott

Thankyou @alexott , that helped

panselaukik avatar Aug 10 '22 17:08 panselaukik