Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Internal HMS does not match spec in databricks_connection resource #4286

Open
wchau opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@wchau
Copy link
Contributor

wchau commented Dec 2, 2024

Configuration

databricks_connection: {
  t_clroom_hms_connection: {
    name: "t_clroom_hms_connection",
    owner: databricksOwnerGroupName,
    connection_type: "HIVE_METASTORE",
    options: {
      builtin: "true",
    },
  },
},

Expected Behavior

All subsequent terraform pushes should not detect diffs.

Actual Behavior

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # databricks_connection.t_clroom_hms_connection will be updated in-place
  ~ resource "databricks_connection" "t_clroom_hms_connection" {
        connection_type = "HIVE_METASTORE"
        id              = "716692ea-44c1-4ffa-9f0c-7b3c4045980a|t_clroom_hms_connection"
        metastore_id    = "716692ea-44c1-4ffa-9f0c-7b3c4045980a"
        name            = "t_clroom_hms_connection"
      ~ options         = (sensitive value)
        owner           = "DB Sentinel Owners - provisioned via TF - DO-NOT-DELETE"
        read_only       = true
    }

Plan: 0 to add, 1 to change, 0 to destroy.

The API returns the following

<   "options": {
<     "builtin": "true",
<     "database": "organization2926395644638727",
<     "home_workspace_id": "2926395644638727",
<     "host": "mdwhiqd83zlimd.chlee7xx28jo.us-west-2.rds.amazonaws.com",
<     "port": "3306"
<   },

There can only be at most 1 internal HMS connection, so it should ignore the other fields if builtin is true.

Steps to Reproduce

Terraform and provider versions

Is it a regression?

No

Debug Output

Important Factoids

Would you like to implement a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant