Skip to content

Commit 562a5cd

Browse files
committed
Enable Photon by default for every new databricks_sql_endpoint
1 parent 2edc247 commit 562a5cd

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Added more selectors to `databricks_node_type` data source ([#723](https://github.com/databrickslabs/terraform-provider-databricks/pull/723))
1313
* Azure auth with SPN now uses AAD token by default instead of PAT. Previous behavior (using PAT) could be restored by setting `azure_use_pat_for_spn` to `true` ([#721](https://github.com/databrickslabs/terraform-provider-databricks/pull/721))
1414
* `deployment_name` for `databricks_mws_workspaces` is now optional, how it should have been. This enables creation of Databricks workspaces without an account prefix.
15+
* To replicate default behavior of Databricks SQL UI, `enable_photon` is now `true` by default for `databricks_sql_endpoint`.
1516
* Various documentation and bugfixes
1617

1718
Updated dependency versions:

docs/resources/sql_endpoint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The following arguments are supported:
3838
* `instance_profile_arn` - [databricks_instance_profile](instance_profile.md) used to access storage from the SQL endpoint. This field is optional.
3939
* `tags` - Databricks tags all endpoint resources with these tags.
4040
* `spot_instance_policy` - The spot policy to use for allocating instances to clusters: `COST_OPTIMIZED` or `RELIABILITY_OPTIMIZED`. This field is optional. Default is `COST_OPTIMIZED`.
41-
* `enable_photon` - Whether to enable [Photon](https://databricks.com/product/delta-engine). This field is optional.
41+
* `enable_photon` - Whether to enable [Photon](https://databricks.com/product/delta-engine). This field is optional and is enabled by default.
4242

4343
## Attribute Reference
4444

identity/scim.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func addEntitlementsToSchema(s *map[string]*schema.Schema) {
8484
(*s)[field_name] = &schema.Schema{
8585
Type: schema.TypeBool,
8686
Optional: true,
87-
Default: false,
87+
Default: false,
8888
}
8989
}
9090
}

sqlanalytics/resource_sql_endpoint.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ func ResourceSQLEndpoint() *schema.Resource {
189189
m["min_num_clusters"].Default = 1
190190
m["num_clusters"].Default = 1
191191
m["spot_instance_policy"].Default = "COST_OPTIMIZED"
192+
m["enable_photon"].Default = true
192193
m["tags"].DiffSuppressFunc = common.MakeEmptyBlockSuppressFunc("tags.#")
193194
return m
194195
})

sqlanalytics/resource_sql_endpoint_test.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func TestResourceSQLEndpointCreate(t *testing.T) {
7878
AutoStopMinutes: 120,
7979
MinNumClusters: 1,
8080
NumClusters: 1,
81+
EnablePhoton: true,
8182
SpotInstancePolicy: "COST_OPTIMIZED",
8283
},
8384
Response: SQLEndpoint{
@@ -116,16 +117,7 @@ func TestResourceSQLEndpointCreate_ErrorDisabled(t *testing.T) {
116117
{
117118
Method: "POST",
118119
Resource: "/api/2.0/sql/endpoints",
119-
ExpectedRequest: SQLEndpoint{
120-
Name: "foo",
121-
ClusterSize: "Small",
122-
AutoStopMinutes: 120,
123-
MaxNumClusters: 1,
124-
MinNumClusters: 1,
125-
NumClusters: 1,
126-
SpotInstancePolicy: "COST_OPTIMIZED",
127-
},
128-
Status: 404,
120+
Status: 404,
129121
Response: common.APIError{
130122
ErrorCode: "FEATURE_DISABLED",
131123
Message: "Databricks SQL is not supported",
@@ -184,6 +176,7 @@ func TestResourceSQLEndpointUpdate(t *testing.T) {
184176
MaxNumClusters: 1,
185177
MinNumClusters: 1,
186178
NumClusters: 1,
179+
EnablePhoton: true,
187180
SpotInstancePolicy: "COST_OPTIMIZED",
188181
},
189182
},

0 commit comments

Comments
 (0)