Skip to content

Commit

Permalink
change attribute name (#5179) (#10023)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Sep 7, 2021
1 parent e0fe16b commit 347b313
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/5179.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed two error messages in `google_compute_instance`
```
4 changes: 2 additions & 2 deletions google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.")
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/compute_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 347b313

Please sign in to comment.