From 38a6404b05ebf515638aead69673e36178e6842b Mon Sep 17 00:00:00 2001 From: SourceQuality <45946716+SourceQuality@users.noreply.github.com> Date: Tue, 23 Jan 2024 07:10:42 -0500 Subject: [PATCH] Update windows hotpatch images (#23500) * Update Windows Hotpatch images * Updated error messages to include new images * Update internal/services/compute/windows_virtual_machine_resource.go Co-authored-by: stephybun --------- Co-authored-by: stephybun --- .../compute/orchestrated_virtual_machine_scale_set_resource.go | 2 +- internal/services/compute/shared_schema.go | 2 +- internal/services/compute/windows_virtual_machine_resource.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go index b2d61d3eef10..1baf2092a874 100644 --- a/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go +++ b/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go @@ -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'") } } } diff --git a/internal/services/compute/shared_schema.go b/internal/services/compute/shared_schema.go index 0758ab834c78..7833c3128a11 100644 --- a/internal/services/compute/shared_schema.go +++ b/internal/services/compute/shared_schema.go @@ -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 } diff --git a/internal/services/compute/windows_virtual_machine_resource.go b/internal/services/compute/windows_virtual_machine_resource.go index 8a0977dfc48d..b05a7ccb2d10 100644 --- a/internal/services/compute/windows_virtual_machine_resource.go +++ b/internal/services/compute/windows_virtual_machine_resource.go @@ -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") } }