Skip to content

Commit 27a1b57

Browse files
committed
fix lint
1 parent 04a5ea8 commit 27a1b57

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

bundle/config/resources/clusters.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ type Cluster struct {
2222
}
2323

2424
// GetLifecycle returns the lifecycle settings, using LifecycleWithStarted.
25-
func (c *Cluster) GetLifecycle() LifecycleConfig {
26-
if c.Lifecycle == nil {
25+
func (s *Cluster) GetLifecycle() LifecycleConfig {
26+
if s.Lifecycle == nil {
2727
return LifecycleWithStarted{}
2828
}
29-
return *c.Lifecycle
29+
return *s.Lifecycle
3030
}
3131

3232
func (s *Cluster) UnmarshalJSON(b []byte) error {

bundle/direct/dresources/cluster.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func (r *ResourceCluster) New(client *databricks.WorkspaceClient) any {
7171

7272
func (r *ResourceCluster) PrepareState(input *resources.Cluster) *ClusterState {
7373
s := &ClusterState{
74+
ClusterId: input.ID,
7475
ClusterSpec: input.ClusterSpec,
7576
Lifecycle: nil,
7677
}
@@ -85,6 +86,7 @@ func (r *ResourceCluster) PrepareState(input *resources.Cluster) *ClusterState {
8586
func (r *ResourceCluster) RemapState(input *ClusterRemote) *ClusterState {
8687
started := input.State == compute.StateRunning
8788
spec := &ClusterState{
89+
ClusterId: input.ClusterId,
8890
ClusterSpec: compute.ClusterSpec{
8991
ApplyPolicyDefaultValues: false,
9092
Autoscale: input.Autoscale,

0 commit comments

Comments
 (0)