Skip to content

Commit b814ca0

Browse files
authored
[Fix] Always fill cluster_name in databricks_cluster data source (#4197)
## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] relevant acceptance tests are passing - [ ] using Go SDK
1 parent 5058e50 commit b814ca0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

clusters/data_cluster.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func DataSourceCluster() common.Resource {
4646
}
4747
data.Id = data.ClusterInfo.ClusterId
4848
data.ClusterId = data.ClusterInfo.ClusterId
49+
data.Name = data.ClusterInfo.ClusterName
4950

5051
return nil
5152
})

clusters/data_cluster_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func TestClusterDataByID(t *testing.T) {
3737
"cluster_info.0.node_type_id": "i3.xlarge",
3838
"cluster_info.0.autoscale.0.max_workers": 4,
3939
"cluster_info.0.state": "RUNNING",
40+
"cluster_name": "Shared Autoscaling",
4041
})
4142
}
4243

@@ -68,6 +69,7 @@ func TestClusterDataByName(t *testing.T) {
6869
"cluster_info.0.node_type_id": "i3.xlarge",
6970
"cluster_info.0.autoscale.0.max_workers": 4,
7071
"cluster_info.0.state": "RUNNING",
72+
"cluster_id": "abc",
7173
})
7274
}
7375

0 commit comments

Comments
 (0)