Skip to content

Commit

Permalink
Revert PRO as default warehouse_type in databricks_sql_endpoint (
Browse files Browse the repository at this point in the history
…#1741)

Rely on the platform to specify the default `warehouse_type`
  • Loading branch information
nfx committed Nov 9, 2022
1 parent 352a578 commit f1173d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/resources/sql_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The following arguments are supported:
* `enable_serverless_compute` - Whether this SQL endpoint is a Serverless endpoint. To use a Serverless SQL endpoint, you must enable Serverless SQL endpoints for the workspace.
* `channel` block, consisting of following fields:
* `name` - Name of the Databricks SQL release channel. Possible values are: `CHANNEL_NAME_PREVIEW` and `CHANNEL_NAME_CURRENT`. Default is `CHANNEL_NAME_CURRENT`.
* `warehouse_type` - [SQL Warehouse Type](https://docs.databricks.com/sql/admin/sql-endpoints.html#switch-the-sql-warehouse-type-pro-classic-or-serverless): `PRO` (default) or `CLASSIC`. If Serverless SQL is enabled, you can only specify `PRO`.
* `warehouse_type` - [SQL Warehouse Type](https://docs.databricks.com/sql/admin/sql-endpoints.html#switch-the-sql-warehouse-type-pro-classic-or-serverless): `PRO` or `CLASSIC` (default). If Serverless SQL is enabled, you can only specify `PRO`.

## Attribute Reference

Expand Down
2 changes: 1 addition & 1 deletion sql/resource_sql_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type SQLEndpoint struct {
Tags *Tags `json:"tags,omitempty" tf:"suppress_diff"`
SpotInstancePolicy string `json:"spot_instance_policy,omitempty" tf:"default:COST_OPTIMIZED"`
Channel *ReleaseChannel `json:"channel,omitempty" tf:"suppress_diff"`
WarehouseType string `json:"warehouse_type,omitempty" tf:"default:PRO"`
WarehouseType string `json:"warehouse_type,omitempty" tf:"suppress_diff"`

// The data source ID is not part of the endpoint API response.
// We manually resolve it by retrieving the list of data sources
Expand Down
3 changes: 0 additions & 3 deletions sql/resource_sql_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func TestResourceSQLEndpointCreate(t *testing.T) {
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
WarehouseType: "PRO",
},
Response: SQLEndpoint{
ID: "abc",
Expand Down Expand Up @@ -129,7 +128,6 @@ func TestResourceSQLEndpointCreateNoAutoTermination(t *testing.T) {
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
WarehouseType: "PRO",
},
Response: SQLEndpoint{
ID: "abc",
Expand Down Expand Up @@ -230,7 +228,6 @@ func TestResourceSQLEndpointUpdate(t *testing.T) {
NumClusters: 1,
EnablePhoton: true,
SpotInstancePolicy: "COST_OPTIMIZED",
WarehouseType: "PRO",
},
},
{
Expand Down

0 comments on commit f1173d6

Please sign in to comment.