Skip to content

Commit

Permalink
Add Confidential VM support to instances and instance templates (#3824)…
Browse files Browse the repository at this point in the history
… (#7000)

* added compute confidential vm support

* fix typo

* add tests for compute instance

* added additional tests

* add beta version gate to tests

* added tests for instance template

* updated testing and add beta provider to tests

* remove import tests

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Aug 11, 2020
1 parent 37a3f25 commit e493153
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changelog/3824.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:enhancement
compute: added confidential_instance_config block to google_compute_instance
```
```release-note:enhancement
compute: added confidential_instance_config block to google_compute_instance_template
```
2 changes: 0 additions & 2 deletions google/resource_compute_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ func resourceComputeInstance() *schema.Resource {
},
},
},

"desired_status": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -1100,7 +1099,6 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
d.Set("description", instance.Description)
d.Set("hostname", instance.Hostname)
d.Set("current_status", instance.Status)

if d.Get("desired_status") != "" {
d.Set("desired_status", instance.Status)
}
Expand Down
2 changes: 1 addition & 1 deletion google/resource_compute_instance_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ func resourceComputeInstanceTemplate() *schema.Resource {
},
},
},

"guest_accelerator": {
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -1191,6 +1190,7 @@ func resourceComputeInstanceTemplateRead(d *schema.ResourceData, meta interface{
return fmt.Errorf("Error setting shielded_instance_config: %s", err)
}
}

if instanceTemplate.Properties.DisplayDevice != nil {
if err = d.Set("enable_display", flattenEnableDisplay(instanceTemplate.Properties.DisplayDevice)); err != nil {
return fmt.Errorf("Error setting enable_display: %s", err)
Expand Down

0 comments on commit e493153

Please sign in to comment.