Skip to content

[ISSUE] Issue with databricks_mws_workspaces resource. Rename forces replacement #4968

@excavator-matt

Description

@excavator-matt

It is very easy to rename the workspace in Workspace Settings -> Appearance, but when you try to rename the Terraform resource directly, it says renamning forces replacement, which seems excessive.

A workaround is to rename it in UI and update Terraform code.

Configuration

resource "databricks_mws_workspaces" "europe_dev_workspace" {
  account_id     = var.databricks_account_id
  aws_region     = var.databricks_aws_region_europe
  workspace_name = "${local.region_europe}-${local.development_environment}"

  credentials_id           = databricks_mws_credentials.europe_dev_creds.credentials_id
  storage_configuration_id = databricks_mws_storage_configurations.dev_europe_storage.storage_configuration_id
  network_id               = databricks_mws_networks.dev_europe.network_id
  custom_tags = {
    Environment  = local.development_environment
    Region = local.region_europe
  }
}

Expected Behavior

It renames the workspace without causing mayhem

Actual Behavior

It forces replacement

~ workspace_name = "europe-prod-workspace" -> "europe-prod" # forces replacement

Steps to Reproduce

  1. Create workspace
  2. Try to rename it

Terraform and provider versions

Databricks AWS

Terraform v1.12.2
on darwin_arm64

  • provider registry.terraform.io/databricks/databricks v1.85.0
  • provider registry.terraform.io/hashicorp/aws v6.6.0

Is it a regression?

No

Debug Output

Important Factoids

Would you like to implement a fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-apichanges to Databricks Platform APIs are required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions