vsphere/virtual_machine_config_structure.go
func expandVirtualMachineBootOptions(d *schema.ResourceData, client *govmomi.Client) *types.VirtualMachineBootOptions {
	obj := &types.VirtualMachineBootOptions{
		BootDelay:        int64(d.Get("boot_delay").(int)),
		BootRetryEnabled: structure.GetBool(d, "boot_retry_enabled"),
		BootRetryDelay:   int64(d.Get("boot_retry_delay").(int)),
	}
	// Only set EFI secure boot if we are on vSphere 6.5 and higher
	version := viapi.ParseVersionFromClient(client)
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		obj.EfiSecureBootEnabled = getBoolWithRestart(d, "efi_secure_boot_enabled")
	}
	return obj
}
func expandVirtualMachineBootOptions(d *schema.ResourceData, client *govmomi.Client) *types.VirtualMachineBootOptions {
	obj := &types.VirtualMachineBootOptions{
		BootDelay:        int64(d.Get("boot_delay").(int)),
		BootRetryEnabled: structure.GetBool(d, "boot_retry_enabled"),
		BootRetryDelay:   int64(d.Get("boot_retry_delay").(int)),
	}
	// Only set EFI secure boot if we are on vSphere 6.5 and higher
	version := viapi.ParseVersionFromClient(client)
	if version.Newer(viapi.VSphereVersion{Product: version.Product, Major: 6, Minor: 5}) {
		obj.EfiSecureBootEnabled = getBoolWithRestart(d, "efi_secure_boot_enabled")
	}
	return obj
}
// expandVirtualMachineBootOptions reads certain ResourceData keys and
// returns a VirtualMachineBootOptions.