This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -185,7 +185,7 @@ func (r *resourceK8SCP) Update(ctx context.Context, req resource.UpdateRequest,
}
// Update Name or/and Description cluster
if !plan.Name.Equal(state.Name) || !plan.Description.Equal(state.Description) {
if !plan.Name.Equal(state.Name) || (!plan.Description.Equal(state.Description) && !plan.Description.IsNull()) {
resp.Diagnostics.Append(utilities.K8SCPUpdateNameOrDescription(ctx, &plan, &state, r.client)...)
if resp.Diagnostics.HasError() {
tflog.Error(ctx, "Error update info")
@@ -221,7 +221,7 @@ func (r *resourceK8SCP) Update(ctx context.Context, req resource.UpdateRequest,
}
//Update LB params
if (state.WithLB.IsNull() || state.WithLB.ValueBool()) && !plan.LBSysctlParams.Equal(state.LBSysctlParams) {
if state.WithLB.ValueBool() && !plan.LBSysctlParams.Equal(state.LBSysctlParams) && !plan.LBSysctlParams.IsNull() {
resp.Diagnostics.Append(utilities.K8CPUpdateSysctlParams(ctx, &plan, &state, r.client)...)
if resp.Diagnostics.HasError() {
tflog.Error(ctx, "Error Update LB params")