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] Issue with databricks_sql_endpoint resource export #3488

Open
TravBricks opened this issue Apr 18, 2024 · 1 comment
Open

[ISSUE] Issue with databricks_sql_endpoint resource export #3488

TravBricks opened this issue Apr 18, 2024 · 1 comment

Comments

@TravBricks
Copy link

  1. SQL warehouse names with parenthesis in them get removed in the export
  2. Exported SQL endpoints do not include the enable_serverless_compute flag

Configuration

resource "databricks_sql_endpoint" "serverless_warehouse" {
  warehouse_type = "PRO"
  enable_serverless_compute = true
  tags {
    custom_tags {
      value = "Business Analytics"
      key   = "Purpose"
    }
  }
  name             = "Terraform Notebook Simple Example (serverless)"
  min_num_clusters = 1
  max_num_clusters = 2
  cluster_size     = "2X-Small"
  auto_stop_mins   = 10
}

resource "databricks_sql_endpoint" "pro_warehouse" {
  warehouse_type = "PRO"
  enable_serverless_compute = false
  tags {
    custom_tags {
      value = "Business Analytics"
      key   = "Purpose"
    }
  }
  name             = "Terraform Notebook Simple Example (pro)"
  min_num_clusters = 1
  max_num_clusters = 2
  cluster_size     = "2X-Small"
  auto_stop_mins   = 10
}

Expected Behavior

Two SQL endpoints in the sql-endpoints.tf file that include the enable_serverless_compute flag

Actual Behavior

A single SQL endpoint, the part of the name in parenthesis is missing and there is no enable_serverless_compute flag that means with a default of true and the warehouse_type argument set to PRO. This will be a serverless warehouse.

Steps to Reproduce

  1. terraform apply with my hcl example above
  2. Run exporter with no arguments, look at the sql-endpoints.tf for output

Terraform and provider versions

Terraform v1.8.1
Databricks provider v1.39

Is it a regression?

Possibly, I did not test before. The default behavior for enable_serverless_compute has changed from false to true.

Debug Output

I can provide access to an internal ADB workspace and notebook where testing was done.

@TravBricks
Copy link
Author

I confirmed the full name with parenthesis and enable_serverless_compute are emitted by the /api/2.0/sql/warehouses API endpoint.
image

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