Skip to content

Commit

Permalink
Update windows hotpatch images (#23500)
Browse files Browse the repository at this point in the history
* Update Windows Hotpatch images

* Updated error messages to include new images

* Update internal/services/compute/windows_virtual_machine_resource.go

Co-authored-by: stephybun <[email protected]>

---------

Co-authored-by: stephybun <[email protected]>
  • Loading branch information
SourceQuality and stephybun authored Jan 23, 2024
1 parent 8927a7f commit 38a6404
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func resourceOrchestratedVirtualMachineScaleSetCreate(d *pluginsdk.ResourceData,
}

if hotpatchingEnabled {
return fmt.Errorf("'hotpatching_enabled' field is not supported unless you are using one of the following hotpatching enable images, '2022-datacenter-azure-edition' or '2022-datacenter-azure-edition-core-smalldisk'")
return fmt.Errorf("'hotpatching_enabled' field is not supported unless you are using one of the following hotpatching enable images, '2022-datacenter-azure-edition', '2022-datacenter-azure-edition-core-smalldisk', '2022-datacenter-azure-edition-hotpatch' or '2022-datacenter-azure-edition-hotpatch-smalldisk'")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/compute/shared_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func isValidHotPatchSourceImageReference(referenceInput []interface{}, imageId s
offer := raw["offer"].(string)
sku := raw["sku"].(string)

if pub == "MicrosoftWindowsServer" && offer == "WindowsServer" && (sku == "2022-datacenter-azure-edition-core" || sku == "2022-datacenter-azure-edition-core-smalldisk") {
if pub == "MicrosoftWindowsServer" && offer == "WindowsServer" && (sku == "2022-datacenter-azure-edition-core" || sku == "2022-datacenter-azure-edition-core-smalldisk" || sku == "2022-datacenter-azure-edition-hotpatch" || sku == "2022-datacenter-azure-edition-hotpatch-smalldisk") {
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ func resourceWindowsVirtualMachineCreate(d *pluginsdk.ResourceData, meta interfa
return fmt.Errorf("the %q field is not supported if referencing the image via the %q field", "hotpatching_enabled", "source_image_id")
}

return fmt.Errorf("%q is currently only supported on %q or %q image reference skus", "hotpatching_enabled", "2022-datacenter-azure-edition-core", "2022-datacenter-azure-edition-core-smalldisk")
return fmt.Errorf("%q is currently only supported on %q, %q, %q or %q image reference skus", "hotpatching_enabled", "2022-datacenter-azure-edition-core", "2022-datacenter-azure-edition-core-smalldisk", "2022-datacenter-azure-edition-hotpatch", "2022-datacenter-azure-edition-hotpatch-smalldisk")
}
}

Expand Down

0 comments on commit 38a6404

Please sign in to comment.