From 347b31372f678e16af276ab64c136fd22ae5a8a0 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 7 Sep 2021 15:39:01 -0500 Subject: [PATCH] change attribute name (#5179) (#10023) Signed-off-by: Modular Magician --- .changelog/5179.txt | 3 +++ google/resource_compute_instance.go | 4 ++-- website/docs/r/compute_instance.html.markdown | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changelog/5179.txt diff --git a/.changelog/5179.txt b/.changelog/5179.txt new file mode 100644 index 00000000000..7c95c50951e --- /dev/null +++ b/.changelog/5179.txt @@ -0,0 +1,3 @@ +```release-note:bug +compute: fixed two error messages in `google_compute_instance` +``` diff --git a/google/resource_compute_instance.go b/google/resource_compute_instance.go index 54ace487725..95b400d2630 100644 --- a/google/resource_compute_instance.go +++ b/google/resource_compute_instance.go @@ -1303,7 +1303,7 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error setting confidential_instance_config: %s", err) } if err := d.Set("advanced_machine_features", flattenAdvancedMachineFeatures(instance.AdvancedMachineFeatures)); err != nil { - return fmt.Errorf("Error setting advanced_machine_config: %s", err) + return fmt.Errorf("Error setting advanced_machine_features: %s", err) } if d.Get("desired_status") != "" { if err := d.Set("desired_status", instance.Status); err != nil { @@ -1744,7 +1744,7 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err if statusBeforeUpdate == "RUNNING" && desiredStatus != "TERMINATED" && !d.Get("allow_stopping_for_update").(bool) { return fmt.Errorf("Changing the machine_type, min_cpu_platform, service_account, enable_display, shielded_instance_config, scheduling.node_affinities " + - "or network_interface.[#d].(network/subnetwork/subnetwork_project) or advanced_machine_config on a started instance requires stopping it. " + + "or network_interface.[#d].(network/subnetwork/subnetwork_project) or advanced_machine_features on a started instance requires stopping it. " + "To acknowledge this, please set allow_stopping_for_update = true in your config. " + "You can also stop it by setting desired_status = \"TERMINATED\", but the instance will not be restarted after the update.") } diff --git a/website/docs/r/compute_instance.html.markdown b/website/docs/r/compute_instance.html.markdown index fc5b4ed6f18..0d608ca6631 100644 --- a/website/docs/r/compute_instance.html.markdown +++ b/website/docs/r/compute_instance.html.markdown @@ -176,7 +176,7 @@ The following arguments are supported: * `confidential_instance_config` (Optional) - Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. -* `advanced_machine_config` (Optional) - Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. +* `advanced_machine_features` (Optional) - Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. * `network_performance_config` (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) Configures network performance settings for the instance. Structure is