terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Incorrect diff for num_clusters in SQL Endpoint when endpoint is not running
Hi,
Configuration
resource "databricks_sql_endpoint" "this" {
name = "Terraform-testing Endpoint"
cluster_size = "Large"
min_num_clusters = 1
max_num_clusters = 2
auto_stop_mins = 10
}
Expected Behavior
No change on subsequent applies when endpoint is not running
Actual Behavior
Steps to reproduce
create the endpoint
turn it off
terraform apply again
Terraform and provider versions
provider 0.5.4
Notes
Already reported in https://github.com/databrickslabs/terraform-provider-databricks/issues/1116 with attached fix: https://github.com/databrickslabs/terraform-provider-databricks/pull/1117
however the fix does not seem to work
an additional question @nfx is there a reason why the endpoint is started on creation ? I guess it is required to get some of the outputs. Same thing for clusters
@ebarault exactly. also to verify that it's configuring properly.
@shreyas-goenka the fix should include adding tf:"suppress_diff" type tag to the field in question. see instructions at https://github.com/databricks/terraform-provider-databricks/blob/master/CONTRIBUTING.md#adding-a-new-resource
we really have suppress_diff for num_clusters: https://github.com/databricks/terraform-provider-databricks/blob/master/sql/resource_sql_endpoint.go#L30
@alexott then it doesn't seem to work
We face the same issue.
We tried to hardcode the number of clusters
num_clusters = 1
Is it normal to check this variable when you specify a min and a max for the num of clusters?
Following up - is this issue still relevant?
I think so yes, there are two things we need to solve here:
- Figure out why suppress diff is not working for num_clusters.
- Do we want a consistent endpoint experience on create and update, ie on update, start the endpoint. This makes sense from infrastructure as a code POV since the num_clusters for the endpoint are specified and terraform should create those by starting the endpoint.
Following up - is this issue still relevant?
Running v1.5.0 I'm not able to re-create this anymore :+1: :shrug:
We are using version 1.7.0 and getting this error.
This issue can be reproducible in 1.6.5 and 1.7.0 as well
We are also getting this error in 1.7.0