Skip to content

Commit

Permalink
Update idleScaling and idleTimeoutMinutes for dev tier as well (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 authored Aug 5, 2024
1 parent fdbdcb1 commit 86f524f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clickhouse/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,12 @@ func (r *ServiceResource) syncServiceState(ctx context.Context, state *ServiceRe
state.CloudProvider = types.StringValue(service.Provider)
state.Region = types.StringValue(service.Region)
state.Tier = types.StringValue(service.Tier)
state.IdleScaling = types.BoolValue(service.IdleScaling)
if service.IdleTimeoutMinutes != nil {
state.IdleTimeoutMinutes = types.Int64Value(int64(*service.IdleTimeoutMinutes))
}

if service.Tier == api.TierProduction {
state.IdleScaling = types.BoolValue(service.IdleScaling)
if service.MinTotalMemoryGb != nil {
state.MinTotalMemoryGb = types.Int64Value(int64(*service.MinTotalMemoryGb))
}
Expand All @@ -853,9 +856,6 @@ func (r *ServiceResource) syncServiceState(ctx context.Context, state *ServiceRe
if service.NumReplicas != nil {
state.NumReplicas = types.Int64Value(int64(*service.NumReplicas))
}
if service.IdleTimeoutMinutes != nil {
state.IdleTimeoutMinutes = types.Int64Value(int64(*service.IdleTimeoutMinutes))
}
}

ipAccessList := []IpAccessModel{}
Expand Down

0 comments on commit 86f524f

Please sign in to comment.