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

Fixed incorrect diff for num_clusters and min_num_clusters for stopped databricks_sql_endpoint #1927

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sql/resource_sql_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ type SQLEndpoint struct {
Name string `json:"name"`
ClusterSize string `json:"cluster_size"`
AutoStopMinutes int `json:"auto_stop_mins" tf:"optional,default:120"`
MinNumClusters int `json:"min_num_clusters,omitempty" tf:"default:1,suppress_diff"`
MinNumClusters int `json:"min_num_clusters,omitempty" tf:"suppress_diff"`
MaxNumClusters int `json:"max_num_clusters,omitempty" tf:"default:1"`
NumClusters int `json:"num_clusters,omitempty" tf:"default:1,suppress_diff"`
NumClusters int `json:"num_clusters,omitempty" tf:"suppress_diff"`
EnablePhoton bool `json:"enable_photon" tf:"optional,default:true"`
EnableServerlessCompute bool `json:"enable_serverless_compute,omitempty" tf:"suppress_diff"`
InstanceProfileARN string `json:"instance_profile_arn,omitempty"`
Expand Down
9 changes: 3 additions & 6 deletions sql/resource_sql_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ func TestResourceSQLEndpointCreate(t *testing.T) {
ClusterSize: "Small",
MaxNumClusters: 1,
AutoStopMinutes: 120,
MinNumClusters: 1,
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
},
Expand All @@ -97,6 +95,7 @@ func TestResourceSQLEndpointCreate(t *testing.T) {
State: "RUNNING",
Tags: &Tags{},
MaxNumClusters: 1,
NumClusters: 1,
},
},
dataSourceListHTTPFixture,
Expand Down Expand Up @@ -124,8 +123,6 @@ func TestResourceSQLEndpointCreateNoAutoTermination(t *testing.T) {
ClusterSize: "Small",
MaxNumClusters: 1,
AutoStopMinutes: 0,
MinNumClusters: 1,
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
},
Expand All @@ -144,6 +141,7 @@ func TestResourceSQLEndpointCreateNoAutoTermination(t *testing.T) {
State: "RUNNING",
Tags: &Tags{},
MaxNumClusters: 1,
NumClusters: 1,
},
},
dataSourceListHTTPFixture,
Expand Down Expand Up @@ -224,8 +222,6 @@ func TestResourceSQLEndpointUpdate(t *testing.T) {
ClusterSize: "Small",
AutoStopMinutes: 120,
MaxNumClusters: 1,
MinNumClusters: 1,
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
},
Expand All @@ -239,6 +235,7 @@ func TestResourceSQLEndpointUpdate(t *testing.T) {
ClusterSize: "Small",
ID: "abc",
State: "RUNNING",
NumClusters: 1,
},
},
dataSourceListHTTPFixture,
Expand Down