This commit is contained in:
asteam
2024-12-04 13:18:58 +03:00
parent 003e4d656e
commit 76ea459b3d
417 changed files with 30051 additions and 975 deletions

View File

@@ -196,13 +196,6 @@ func (r *resourceLB) Update(ctx context.Context, req resource.UpdateRequest, res
}
tflog.Info(ctx, "Update resourceLB: input checks successful", map[string]any{"ID": plan.ID.ValueString()})
// Read status lb and if it is necessary to restore it
resp.Diagnostics.Append(utilities.LBReadStatus(ctx, &state, r.client)...)
if resp.Diagnostics.HasError() {
tflog.Error(ctx, "Error read status or restore")
return
}
// Update ha mode lb
if !plan.HAMode.Equal(state.HAMode) && plan.HAMode.ValueBool() {
resp.Diagnostics.Append(utilities.LBUpdateHaMode(ctx, &state, r.client)...)

View File

@@ -22,7 +22,7 @@ func CreateResourceLB(ctx context.Context, plan *models.ResourceLBModel, c *deco
createReq := lb.CreateRequest{
Name: plan.Name.ValueString(),
RGID: uint64(plan.RGID.ValueInt64()),
ExtNetID: uint64(plan.ExtNetID.ValueInt64()),
ExtNetID: plan.ExtNetID.ValueInt64(),
VINSID: uint64(plan.VINSID.ValueInt64()),
Start: plan.Start.ValueBool(),
}