Skip to content

Commit

Permalink
Merge pull request #226 from yannickstruyf3/bugfix/machine_type_for_s…
Browse files Browse the repository at this point in the history
…ecure_boot_ds

added machine_type to data source
  • Loading branch information
marinsalinas authored Jan 6, 2021
2 parents ca54157 + 2105455 commit 7ee4c99
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nutanix/data_source_nutanix_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ func dataSourceNutanixVirtualMachine() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"machine_type": {
Type: schema.TypeString,
Computed: true,
},
"hardware_clock_timezone": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -712,6 +716,7 @@ func dataSourceNutanixVirtualMachineRead(d *schema.ResourceData, meta interface{
diskAddress := make(map[string]interface{})
mac := ""
bootType := ""
machineType := ""
b := make([]string, 0)

if resp.Status.Resources.BootConfig != nil {
Expand All @@ -730,11 +735,15 @@ func dataSourceNutanixVirtualMachineRead(d *schema.ResourceData, meta interface{
bootType = utils.StringValue(resp.Status.Resources.BootConfig.BootType)
}
}
if resp.Status.Resources.MachineType != nil {
machineType = utils.StringValue(resp.Status.Resources.MachineType)
}

d.Set("boot_device_order_list", b)
d.Set("boot_device_disk_address", diskAddress)
d.Set("boot_device_mac_address", mac)
d.Set("boot_type", bootType)
d.Set("machine_type", machineType)

sysprep := make(map[string]interface{})
sysrepCV := make(map[string]string)
Expand Down

0 comments on commit 7ee4c99

Please sign in to comment.