From 52a80f7f1aeb1f49668c24cb07f31d4e06cc5431 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Fri, 5 Nov 2021 23:22:25 +0100 Subject: [PATCH] Fix acceptance test --- internal/services/compute/linux_virtual_machine_resource.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/services/compute/linux_virtual_machine_resource.go b/internal/services/compute/linux_virtual_machine_resource.go index 64980d2b89d6d..edb3d07cf29d7 100644 --- a/internal/services/compute/linux_virtual_machine_resource.go +++ b/internal/services/compute/linux_virtual_machine_resource.go @@ -662,8 +662,9 @@ func resourceLinuxVirtualMachineRead(d *pluginsdk.ResourceData, meta interface{} if err := d.Set("admin_ssh_key", pluginsdk.NewSet(SSHKeySchemaHash, *flattenedSSHKeys)); err != nil { return fmt.Errorf("setting `admin_ssh_key`: %+v", err) } - if patchSettings := config.PatchSettings; patchSettings != nil { - d.Set("patch_mode", patchSettings.PatchMode) + patchSettings := config.PatchSettings + if patchSettings != nil && patchSettings.PatchMode != "" { + d.Set("patch_mode", compute.LinuxVMGuestPatchMode(patchSettings.PatchMode)) } }