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

[ISSUE] Issue with IMPORTED `databricks_mlflow_model` resource

Open huy-nguyen26 opened this issue 1 year ago • 1 comments

Hi, I'm encountering an issue with the IMPORTED databricks_mlflow_model resource. Here's my scenario: initially, we manually created the Model Registry. Then, we opted to migrate it to Terraform using the Terraform import block. The import process was successful, allowing us to manage the resource state. However, we've encountered a problem when attempting to make changes post-import. For instance, although we've included new tags for our Model Registry in our Terraform plan and applied it, the changes are not reflected in the Databricks Model Registry. And strangely, the Last Modified information of our Model Registry appears to be up to date. We also tested with additional options, but it appears that only the description can be updated.

How could I resolve this problem please?

Configuration

Import existing Model Registry to Terraform with import block

import {
  to = module.my_own_module.databricks[0].databricks_mlflow_model.databricks_mlflow_model_registry["spd-ai-llm"]
  id = "spd-ai-llm"
}

Expected Behavior

We should be able to update the imported resource, such as adding more tags, handling permissions.

Actual Behavior

However, despite a successful Terraform plan and apply, we are unable to make updates except the description of the resource.

Steps to Reproduce

  1. Create a Model Registry manually (via the UI of Databricks)
  2. Use Terraform import block to import the resource to Terraform
  3. Try to update the imported resource (add more tags or change permissions for ex)

Terraform and provider versions

terraform 1.6.6 provider registry.terraform.io/databricks/databricks v1.31.1

huy-nguyen26 avatar Apr 17 '24 10:04 huy-nguyen26

Any assistance please?

huy-nguyen26 avatar Apr 29 '24 08:04 huy-nguyen26

Any assistance please?

huy-nguyen26 avatar May 14 '24 16:05 huy-nguyen26

Hi @huy-nguyen26 this is a known limitation of the registered model resource where tags cannot be updated. Since the primary focus is now on UC Models instead of Workspace models, we don't have a timeline for when this can be fixed

arpitjasa-db avatar Jun 28 '24 07:06 arpitjasa-db

Closing since this is a dupe of https://github.com/databricks/terraform-provider-databricks/issues/1225

arpitjasa-db avatar Jun 28 '24 07:06 arpitjasa-db

Hi @arpitjasa-db , understood, thank you for your response !!!

huy-nguyen26 avatar Jun 30 '24 09:06 huy-nguyen26