1.3.0
This commit is contained in:
@@ -22,12 +22,6 @@ func resourceDiskCreateInputChecks(ctx context.Context, plan *models.ResourceDis
|
||||
diags.AddError(fmt.Sprintf("Cannot get info about account with ID %v", accountId), err.Error())
|
||||
}
|
||||
|
||||
gid := uint64(plan.GID.ValueInt64())
|
||||
tflog.Info(ctx, "resourceDiskCreateInputChecks: exist gid check", map[string]any{"gid": gid})
|
||||
err = ic.ExistGID(ctx, gid, c)
|
||||
if err != nil {
|
||||
diags.AddError(fmt.Sprintf("Cannot get info about GID %v", gid), err.Error())
|
||||
}
|
||||
return diags
|
||||
}
|
||||
|
||||
@@ -62,7 +56,7 @@ func resourceDiskUpdateInputChecks(ctx context.Context, plan, state *models.Reso
|
||||
fmt.Sprintf("cannot change description from %s to %s for disk id %s",
|
||||
state.Description.ValueString(),
|
||||
plan.Description.ValueString(),
|
||||
plan.Id.ValueString()))
|
||||
plan.ID.ValueString()))
|
||||
}
|
||||
|
||||
// check pool
|
||||
@@ -72,7 +66,7 @@ func resourceDiskUpdateInputChecks(ctx context.Context, plan, state *models.Reso
|
||||
fmt.Sprintf("cannot change pool from %s to %s for disk id %s",
|
||||
state.Pool.ValueString(),
|
||||
plan.Pool.ValueString(),
|
||||
plan.Id.ValueString()))
|
||||
plan.ID.ValueString()))
|
||||
}
|
||||
|
||||
// check sep_id
|
||||
@@ -82,17 +76,7 @@ func resourceDiskUpdateInputChecks(ctx context.Context, plan, state *models.Reso
|
||||
fmt.Sprintf("cannot change sep_id from %d to %d for disk id %s",
|
||||
state.SEPID.ValueInt64(),
|
||||
plan.SEPID.ValueInt64(),
|
||||
plan.Id.ValueString()))
|
||||
}
|
||||
|
||||
// check type
|
||||
if !plan.Type.Equal(state.Type) && !plan.Type.IsUnknown() {
|
||||
diags.AddError(
|
||||
"resourceDiskUpdateInputChecks: type change is not allowed",
|
||||
fmt.Sprintf("cannot change type from %s to %s for disk id %s",
|
||||
state.Type.ValueString(),
|
||||
plan.Type.ValueString(),
|
||||
plan.Id.ValueString()))
|
||||
plan.ID.ValueString()))
|
||||
}
|
||||
|
||||
return diags
|
||||
|
||||
Reference in New Issue
Block a user