From 6e9dbb55e6617fcbe35053d90ba061432ea9e20f Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Mon, 27 May 2024 15:15:35 +0200 Subject: [PATCH 1/3] Ensure virtual machines are not created when enabling hibernation --- internal/services/compute/virtual_machine.go | 1 - website/docs/r/linux_virtual_machine.html.markdown | 2 +- website/docs/r/windows_virtual_machine.html.markdown | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/services/compute/virtual_machine.go b/internal/services/compute/virtual_machine.go index d5261eb3c873..f962baf07bfa 100644 --- a/internal/services/compute/virtual_machine.go +++ b/internal/services/compute/virtual_machine.go @@ -40,7 +40,6 @@ func virtualMachineAdditionalCapabilitiesSchema() *pluginsdk.Schema { "hibernation_enabled": { Type: pluginsdk.TypeBool, - ForceNew: true, Optional: true, Default: false, }, diff --git a/website/docs/r/linux_virtual_machine.html.markdown b/website/docs/r/linux_virtual_machine.html.markdown index 72b87a169485..aa13946b36e2 100644 --- a/website/docs/r/linux_virtual_machine.html.markdown +++ b/website/docs/r/linux_virtual_machine.html.markdown @@ -232,7 +232,7 @@ A `additional_capabilities` block supports the following: * `ultra_ssd_enabled` - (Optional) Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. -* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. Changing this forces a new Linux Virtual Machine to be created. +* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. --- diff --git a/website/docs/r/windows_virtual_machine.html.markdown b/website/docs/r/windows_virtual_machine.html.markdown index dcdb453b439d..f72fb5a4a79f 100644 --- a/website/docs/r/windows_virtual_machine.html.markdown +++ b/website/docs/r/windows_virtual_machine.html.markdown @@ -231,7 +231,7 @@ A `additional_capabilities` block supports the following: * `ultra_ssd_enabled` - (Optional) Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. -* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. Changing this forces a new Windows Virtual Machine to be created. +* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. --- From 3ed9cbb8a40d408595d2bbd0889db7f2ed348f8f Mon Sep 17 00:00:00 2001 From: stephybun Date: Mon, 27 May 2024 16:16:41 +0200 Subject: [PATCH 2/3] fix vendor deps (#26113) --- .../resource-manager/keyvault/2023-07-01/vaults/method_list.go | 1 + .../keyvault/2023-07-01/vaults/method_listbyresourcegroup.go | 1 + .../keyvault/2023-07-01/vaults/method_listbysubscription.go | 1 + .../keyvault/2023-07-01/vaults/method_listdeleted.go | 1 + .../resources/2015-11-01/resources/method_list.go | 1 + 5 files changed, 5 insertions(+) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_list.go index a2db91dc5c90..37aefadcee59 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_list.go @@ -105,6 +105,7 @@ func (c VaultsClient) ListCompleteMatchingPredicate(ctx context.Context, id comm resp, err := c.List(ctx, id, options) if err != nil { + result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go index 342da5a0bac3..1c29ec9b8f1e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go @@ -101,6 +101,7 @@ func (c VaultsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.C resp, err := c.ListByResourceGroup(ctx, id, options) if err != nil { + result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go index 1a9d39bdf075..9785990d6038 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go @@ -101,6 +101,7 @@ func (c VaultsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Co resp, err := c.ListBySubscription(ctx, id, options) if err != nil { + result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listdeleted.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listdeleted.go index 9b5afe66345b..a82c43d0626b 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listdeleted.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults/method_listdeleted.go @@ -73,6 +73,7 @@ func (c VaultsClient) ListDeletedCompleteMatchingPredicate(ctx context.Context, resp, err := c.ListDeleted(ctx, id) if err != nil { + result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) return } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resources/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resources/method_list.go index 0629f72fd515..2ea656bf23a0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resources/method_list.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resources/method_list.go @@ -109,6 +109,7 @@ func (c ResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id c resp, err := c.List(ctx, id, options) if err != nil { + result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) return } From 7efeec1e03fcd1d24569d47029b1935b6e1b1968 Mon Sep 17 00:00:00 2001 From: audunsolemdal Date: Mon, 27 May 2024 15:15:35 +0200 Subject: [PATCH 3/3] Ensure virtual machines are not created when enabling hibernation --- internal/services/compute/virtual_machine.go | 1 - website/docs/r/linux_virtual_machine.html.markdown | 2 +- website/docs/r/windows_virtual_machine.html.markdown | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/services/compute/virtual_machine.go b/internal/services/compute/virtual_machine.go index d5261eb3c873..f962baf07bfa 100644 --- a/internal/services/compute/virtual_machine.go +++ b/internal/services/compute/virtual_machine.go @@ -40,7 +40,6 @@ func virtualMachineAdditionalCapabilitiesSchema() *pluginsdk.Schema { "hibernation_enabled": { Type: pluginsdk.TypeBool, - ForceNew: true, Optional: true, Default: false, }, diff --git a/website/docs/r/linux_virtual_machine.html.markdown b/website/docs/r/linux_virtual_machine.html.markdown index 72b87a169485..aa13946b36e2 100644 --- a/website/docs/r/linux_virtual_machine.html.markdown +++ b/website/docs/r/linux_virtual_machine.html.markdown @@ -232,7 +232,7 @@ A `additional_capabilities` block supports the following: * `ultra_ssd_enabled` - (Optional) Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. -* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. Changing this forces a new Linux Virtual Machine to be created. +* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. --- diff --git a/website/docs/r/windows_virtual_machine.html.markdown b/website/docs/r/windows_virtual_machine.html.markdown index dcdb453b439d..f72fb5a4a79f 100644 --- a/website/docs/r/windows_virtual_machine.html.markdown +++ b/website/docs/r/windows_virtual_machine.html.markdown @@ -231,7 +231,7 @@ A `additional_capabilities` block supports the following: * `ultra_ssd_enabled` - (Optional) Should the capacity to enable Data Disks of the `UltraSSD_LRS` storage account type be supported on this Virtual Machine? Defaults to `false`. -* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. Changing this forces a new Windows Virtual Machine to be created. +* `hibernation_enabled` - (Optional) Whether to enable the hibernation capability or not. ---