This commit is contained in:
2025-08-12 12:05:17 +03:00
parent 5d15e83d56
commit f33b8e3e7d
4 changed files with 17 additions and 8 deletions

View File

@@ -866,10 +866,14 @@ func resourceComputeUpdate(ctx context.Context, d *schema.ResourceData, m interf
}
}
// Note bene: numa_affinity, cpu_pin and hp_backed, cpu, ram are not allowed to be changed for compute in STARTED tech status.
// Note bene: numa_affinity, cpu_pin, old_cpu > new_cpu and hp_backed are not allowed to be changed for compute in STARTED tech status.
// If STARTED, we need to stop it before update
var isStopRequired bool
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu", "ram", "cpu") && d.Get("started").(bool) {
if d.HasChanges("numa_affinity", "cpu_pin", "hp_backed", "chipset", "preferred_cpu") && d.Get("started").(bool) {
isStopRequired = true
}
old, new := d.GetChange("cpu")
if old.(int) > new.(int) && d.Get("started").(bool) {
isStopRequired = true
}
if isStopRequired {