Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.compute.WindowsVirtualMachineArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.compute;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineAdditionalCapabilitiesArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineAdditionalUnattendContentArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineBootDiagnosticsArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineGalleryApplicationArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineIdentityArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineOsDiskArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineOsImageNotificationArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachinePlanArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineSecretArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineSourceImageReferenceArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineTerminationNotificationArgs;
import com.pulumi.azure.compute.inputs.WindowsVirtualMachineWinrmListenerArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class WindowsVirtualMachineArgs extends com.pulumi.resources.ResourceArgs {
public static final WindowsVirtualMachineArgs Empty = new WindowsVirtualMachineArgs();
/**
* A `additional_capabilities` block as defined below.
*
*/
@Import(name="additionalCapabilities")
private @Nullable Output additionalCapabilities;
/**
* @return A `additional_capabilities` block as defined below.
*
*/
public Optional> additionalCapabilities() {
return Optional.ofNullable(this.additionalCapabilities);
}
/**
* One or more `additional_unattend_content` blocks as defined below. Changing this forces a new resource to be created.
*
*/
@Import(name="additionalUnattendContents")
private @Nullable Output> additionalUnattendContents;
/**
* @return One or more `additional_unattend_content` blocks as defined below. Changing this forces a new resource to be created.
*
*/
public Optional>> additionalUnattendContents() {
return Optional.ofNullable(this.additionalUnattendContents);
}
/**
* The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="adminPassword", required=true)
private Output adminPassword;
/**
* @return The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Output adminPassword() {
return this.adminPassword;
}
/**
* The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="adminUsername", required=true)
private Output adminUsername;
/**
* @return The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Output adminUsername() {
return this.adminUsername;
}
/**
* Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`.
*
*/
@Import(name="allowExtensionOperations")
private @Nullable Output allowExtensionOperations;
/**
* @return Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`.
*
*/
public Optional> allowExtensionOperations() {
return Optional.ofNullable(this.allowExtensionOperations);
}
/**
* Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*
*/
@Import(name="availabilitySetId")
private @Nullable Output availabilitySetId;
/**
* @return Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*
*/
public Optional> availabilitySetId() {
return Optional.ofNullable(this.availabilitySetId);
}
/**
* A `boot_diagnostics` block as defined below.
*
*/
@Import(name="bootDiagnostics")
private @Nullable Output bootDiagnostics;
/**
* @return A `boot_diagnostics` block as defined below.
*
*/
public Optional> bootDiagnostics() {
return Optional.ofNullable(this.bootDiagnostics);
}
/**
* Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`.
*
* > **NOTE:** `bypass_platform_safety_checks_on_user_schedule_enabled` can only be set to `true` when `patch_mode` is set to `AutomaticByPlatform`.
*
*/
@Import(name="bypassPlatformSafetyChecksOnUserScheduleEnabled")
private @Nullable Output bypassPlatformSafetyChecksOnUserScheduleEnabled;
/**
* @return Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`.
*
* > **NOTE:** `bypass_platform_safety_checks_on_user_schedule_enabled` can only be set to `true` when `patch_mode` is set to `AutomaticByPlatform`.
*
*/
public Optional> bypassPlatformSafetyChecksOnUserScheduleEnabled() {
return Optional.ofNullable(this.bypassPlatformSafetyChecksOnUserScheduleEnabled);
}
/**
* Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to.
*
* > **NOTE:** `capacity_reservation_group_id` cannot be used with `availability_set_id` or `proximity_placement_group_id`
*
*/
@Import(name="capacityReservationGroupId")
private @Nullable Output capacityReservationGroupId;
/**
* @return Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to.
*
* > **NOTE:** `capacity_reservation_group_id` cannot be used with `availability_set_id` or `proximity_placement_group_id`
*
*/
public Optional> capacityReservationGroupId() {
return Optional.ofNullable(this.capacityReservationGroupId);
}
/**
* Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computer_name`, then you must specify `computer_name`. Changing this forces a new resource to be created.
*
*/
@Import(name="computerName")
private @Nullable Output computerName;
/**
* @return Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computer_name`, then you must specify `computer_name`. Changing this forces a new resource to be created.
*
*/
public Optional> computerName() {
return Optional.ofNullable(this.computerName);
}
/**
* The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="customData")
private @Nullable Output customData;
/**
* @return The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Optional> customData() {
return Optional.ofNullable(this.customData);
}
/**
* The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicated_host_id`.
*
*/
@Import(name="dedicatedHostGroupId")
private @Nullable Output dedicatedHostGroupId;
/**
* @return The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicated_host_id`.
*
*/
public Optional> dedicatedHostGroupId() {
return Optional.ofNullable(this.dedicatedHostGroupId);
}
/**
* The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicated_host_group_id`.
*
*/
@Import(name="dedicatedHostId")
private @Nullable Output dedicatedHostId;
/**
* @return The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicated_host_group_id`.
*
*/
public Optional> dedicatedHostId() {
return Optional.ofNullable(this.dedicatedHostId);
}
/**
* Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`.
*
*/
@Import(name="diskControllerType")
private @Nullable Output diskControllerType;
/**
* @return Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`.
*
*/
public Optional> diskControllerType() {
return Optional.ofNullable(this.diskControllerType);
}
/**
* Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created.
*
*/
@Import(name="edgeZone")
private @Nullable Output edgeZone;
/**
* @return Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created.
*
*/
public Optional> edgeZone() {
return Optional.ofNullable(this.edgeZone);
}
/**
* Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`.
*
*/
@Import(name="enableAutomaticUpdates")
private @Nullable Output enableAutomaticUpdates;
/**
* @return Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`.
*
*/
public Optional> enableAutomaticUpdates() {
return Optional.ofNullable(this.enableAutomaticUpdates);
}
/**
* Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host?
*
*/
@Import(name="encryptionAtHostEnabled")
private @Nullable Output encryptionAtHostEnabled;
/**
* @return Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host?
*
*/
public Optional> encryptionAtHostEnabled() {
return Optional.ofNullable(this.encryptionAtHostEnabled);
}
/**
* Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
*/
@Import(name="evictionPolicy")
private @Nullable Output evictionPolicy;
/**
* @return Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
*/
public Optional> evictionPolicy() {
return Optional.ofNullable(this.evictionPolicy);
}
/**
* Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
*/
@Import(name="extensionsTimeBudget")
private @Nullable Output extensionsTimeBudget;
/**
* @return Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
*/
public Optional> extensionsTimeBudget() {
return Optional.ofNullable(this.extensionsTimeBudget);
}
/**
* One or more `gallery_application` blocks as defined below.
*
* > **Note** Gallery Application Assignments can be defined either directly on `azure.compute.WindowsVirtualMachine` resource, or using the `azure.compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `azure.compute.GalleryApplicationAssignment` is used, it's recommended to use `ignore_changes` for the `gallery_application` block on the corresponding `azure.compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource.
*
*/
@Import(name="galleryApplications")
private @Nullable Output> galleryApplications;
/**
* @return One or more `gallery_application` blocks as defined below.
*
* > **Note** Gallery Application Assignments can be defined either directly on `azure.compute.WindowsVirtualMachine` resource, or using the `azure.compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `azure.compute.GalleryApplicationAssignment` is used, it's recommended to use `ignore_changes` for the `gallery_application` block on the corresponding `azure.compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource.
*
*/
public Optional>> galleryApplications() {
return Optional.ofNullable(this.galleryApplications);
}
/**
* Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch).
*
* > **NOTE:** Hotpatching can only be enabled if the `patch_mode` is set to `AutomaticByPlatform`, the `provision_vm_agent` is set to `true`, your `source_image_reference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatching_enabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository.
*
*/
@Import(name="hotpatchingEnabled")
private @Nullable Output hotpatchingEnabled;
/**
* @return Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch).
*
* > **NOTE:** Hotpatching can only be enabled if the `patch_mode` is set to `AutomaticByPlatform`, the `provision_vm_agent` is set to `true`, your `source_image_reference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatching_enabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository.
*
*/
public Optional> hotpatchingEnabled() {
return Optional.ofNullable(this.hotpatchingEnabled);
}
/**
* An `identity` block as defined below.
*
*/
@Import(name="identity")
private @Nullable Output identity;
/**
* @return An `identity` block as defined below.
*
*/
public Optional> identity() {
return Optional.ofNullable(this.identity);
}
/**
* Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
*/
@Import(name="licenseType")
private @Nullable Output licenseType;
/**
* @return Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
*/
public Optional> licenseType() {
return Optional.ofNullable(this.licenseType);
}
/**
* The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created.
*
*/
@Import(name="location")
private @Nullable Output location;
/**
* @return The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created.
*
*/
public Optional> location() {
return Optional.ofNullable(this.location);
}
/**
* The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `eviction_policy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
*/
@Import(name="maxBidPrice")
private @Nullable Output maxBidPrice;
/**
* @return The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `eviction_policy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
*/
public Optional> maxBidPrice() {
return Optional.ofNullable(this.maxBidPrice);
}
/**
* The name of the Windows Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the Windows Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.
*
*/
@Import(name="networkInterfaceIds", required=true)
private Output> networkInterfaceIds;
/**
* @return . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.
*
*/
public Output> networkInterfaceIds() {
return this.networkInterfaceIds;
}
/**
* A `os_disk` block as defined below.
*
*/
@Import(name="osDisk", required=true)
private Output osDisk;
/**
* @return A `os_disk` block as defined below.
*
*/
public Output osDisk() {
return this.osDisk;
}
/**
* A `os_image_notification` block as defined below.
*
*/
@Import(name="osImageNotification")
private @Nullable Output osImageNotification;
/**
* @return A `os_image_notification` block as defined below.
*
*/
public Optional> osImageNotification() {
return Optional.ofNullable(this.osImageNotification);
}
/**
* Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`.
*
* > **NOTE:** If the `patch_assessment_mode` is set to `AutomaticByPlatform` then the `provision_vm_agent` field must be set to `true`.
*
*/
@Import(name="patchAssessmentMode")
private @Nullable Output patchAssessmentMode;
/**
* @return Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`.
*
* > **NOTE:** If the `patch_assessment_mode` is set to `AutomaticByPlatform` then the `provision_vm_agent` field must be set to `true`.
*
*/
public Optional> patchAssessmentMode() {
return Optional.ofNullable(this.patchAssessmentMode);
}
/**
* Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes).
*
* > **NOTE:** If `patch_mode` is set to `AutomaticByPlatform` then `provision_vm_agent` must also be set to `true`. If the Virtual Machine is using a hotpatching enabled image the `patch_mode` must always be set to `AutomaticByPlatform`.
*
*/
@Import(name="patchMode")
private @Nullable Output patchMode;
/**
* @return Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes).
*
* > **NOTE:** If `patch_mode` is set to `AutomaticByPlatform` then `provision_vm_agent` must also be set to `true`. If the Virtual Machine is using a hotpatching enabled image the `patch_mode` must always be set to `AutomaticByPlatform`.
*
*/
public Optional> patchMode() {
return Optional.ofNullable(this.patchMode);
}
/**
* A `plan` block as defined below. Changing this forces a new resource to be created.
*
*/
@Import(name="plan")
private @Nullable Output plan;
/**
* @return A `plan` block as defined below. Changing this forces a new resource to be created.
*
*/
public Optional> plan() {
return Optional.ofNullable(this.plan);
}
/**
* Specifies the Platform Fault Domain in which this Windows Virtual Machine should be created. Defaults to `-1`, which means this will be automatically assigned to a fault domain that best maintains balance across the available fault domains. Changing this forces a new Windows Virtual Machine to be created.
*
*/
@Import(name="platformFaultDomain")
private @Nullable Output platformFaultDomain;
/**
* @return Specifies the Platform Fault Domain in which this Windows Virtual Machine should be created. Defaults to `-1`, which means this will be automatically assigned to a fault domain that best maintains balance across the available fault domains. Changing this forces a new Windows Virtual Machine to be created.
*
*/
public Optional> platformFaultDomain() {
return Optional.ofNullable(this.platformFaultDomain);
}
/**
* Specifies the priority of this Virtual Machine. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this forces a new resource to be created.
*
*/
@Import(name="priority")
private @Nullable Output priority;
/**
* @return Specifies the priority of this Virtual Machine. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this forces a new resource to be created.
*
*/
public Optional> priority() {
return Optional.ofNullable(this.priority);
}
/**
* Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to `true`. Changing this forces a new resource to be created.
*
* > **NOTE:** If `provision_vm_agent` is set to `false` then `allow_extension_operations` must also be set to `false`.
*
*/
@Import(name="provisionVmAgent")
private @Nullable Output provisionVmAgent;
/**
* @return Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to `true`. Changing this forces a new resource to be created.
*
* > **NOTE:** If `provision_vm_agent` is set to `false` then `allow_extension_operations` must also be set to `false`.
*
*/
public Optional> provisionVmAgent() {
return Optional.ofNullable(this.provisionVmAgent);
}
/**
* The ID of the Proximity Placement Group which the Virtual Machine should be assigned to.
*
*/
@Import(name="proximityPlacementGroupId")
private @Nullable Output proximityPlacementGroupId;
/**
* @return The ID of the Proximity Placement Group which the Virtual Machine should be assigned to.
*
*/
public Optional> proximityPlacementGroupId() {
return Optional.ofNullable(this.proximityPlacementGroupId);
}
/**
* Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`.
*
* > **NOTE:** `reboot_setting` can only be set when `patch_mode` is set to `AutomaticByPlatform`.
*
*/
@Import(name="rebootSetting")
private @Nullable Output rebootSetting;
/**
* @return Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`.
*
* > **NOTE:** `reboot_setting` can only be set when `patch_mode` is set to `AutomaticByPlatform`.
*
*/
public Optional> rebootSetting() {
return Optional.ofNullable(this.rebootSetting);
}
/**
* The name of the Resource Group in which the Windows Virtual Machine should be exist. Changing this forces a new resource to be created.
*
*/
@Import(name="resourceGroupName", required=true)
private Output resourceGroupName;
/**
* @return The name of the Resource Group in which the Windows Virtual Machine should be exist. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* One or more `secret` blocks as defined below.
*
*/
@Import(name="secrets")
private @Nullable Output> secrets;
/**
* @return One or more `secret` blocks as defined below.
*
*/
public Optional>> secrets() {
return Optional.ofNullable(this.secrets);
}
/**
* Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="secureBootEnabled")
private @Nullable Output secureBootEnabled;
/**
* @return Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Optional> secureBootEnabled() {
return Optional.ofNullable(this.secureBootEnabled);
}
/**
* The SKU which should be used for this Virtual Machine, such as `Standard_F2`.
*
*/
@Import(name="size", required=true)
private Output size;
/**
* @return The SKU which should be used for this Virtual Machine, such as `Standard_F2`.
*
*/
public Output size() {
return this.size;
}
/**
* The ID of the Image which this Virtual Machine should be created from. Changing this forces a new resource to be created. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
*/
@Import(name="sourceImageId")
private @Nullable Output sourceImageId;
/**
* @return The ID of the Image which this Virtual Machine should be created from. Changing this forces a new resource to be created. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
*/
public Optional> sourceImageId() {
return Optional.ofNullable(this.sourceImageId);
}
/**
* A `source_image_reference` block as defined below. Changing this forces a new resource to be created.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
*/
@Import(name="sourceImageReference")
private @Nullable Output sourceImageReference;
/**
* @return A `source_image_reference` block as defined below. Changing this forces a new resource to be created.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
*/
public Optional> sourceImageReference() {
return Optional.ofNullable(this.sourceImageReference);
}
/**
* A mapping of tags which should be assigned to this Virtual Machine.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return A mapping of tags which should be assigned to this Virtual Machine.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* A `termination_notification` block as defined below.
*
*/
@Import(name="terminationNotification")
private @Nullable Output terminationNotification;
/**
* @return A `termination_notification` block as defined below.
*
*/
public Optional> terminationNotification() {
return Optional.ofNullable(this.terminationNotification);
}
/**
* Specifies the Time Zone which should be used by the Virtual Machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created.
*
*/
@Import(name="timezone")
private @Nullable Output timezone;
/**
* @return Specifies the Time Zone which should be used by the Virtual Machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created.
*
*/
public Optional> timezone() {
return Optional.ofNullable(this.timezone);
}
/**
* The Base64-Encoded User Data which should be used for this Virtual Machine.
*
*/
@Import(name="userData")
private @Nullable Output userData;
/**
* @return The Base64-Encoded User Data which should be used for this Virtual Machine.
*
*/
public Optional> userData() {
return Optional.ofNullable(this.userData);
}
/**
* Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within.
*
* > **NOTE:** To update `virtual_machine_scale_set_id` the Preview Feature `Microsoft.Compute/SingleFDAttachDetachVMToVmss` needs to be enabled, see [the documentation](https://review.learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm#enroll-in-the-preview) for more information.
*
* > **NOTE:** Orchestrated Virtual Machine Scale Sets can be provisioned using [the `azure.compute.OrchestratedVirtualMachineScaleSet` resource](https://www.terraform.io/docs/providers/azurerm/r/orchestrated_virtual_machine_scale_set.html).
*
* > **NOTE:** To attach an existing VM to a Virtual Machine Scale Set, the scale set must have `single_placement_group` set to `false`, see [the documentation](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm?tabs=portal-1%2Cportal-2%2Cportal-3#limitations-for-attaching-an-existing-vm-to-a-scale-set) for more information.
*
*/
@Import(name="virtualMachineScaleSetId")
private @Nullable Output virtualMachineScaleSetId;
/**
* @return Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within.
*
* > **NOTE:** To update `virtual_machine_scale_set_id` the Preview Feature `Microsoft.Compute/SingleFDAttachDetachVMToVmss` needs to be enabled, see [the documentation](https://review.learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm#enroll-in-the-preview) for more information.
*
* > **NOTE:** Orchestrated Virtual Machine Scale Sets can be provisioned using [the `azure.compute.OrchestratedVirtualMachineScaleSet` resource](https://www.terraform.io/docs/providers/azurerm/r/orchestrated_virtual_machine_scale_set.html).
*
* > **NOTE:** To attach an existing VM to a Virtual Machine Scale Set, the scale set must have `single_placement_group` set to `false`, see [the documentation](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm?tabs=portal-1%2Cportal-2%2Cportal-3#limitations-for-attaching-an-existing-vm-to-a-scale-set) for more information.
*
*/
public Optional> virtualMachineScaleSetId() {
return Optional.ofNullable(this.virtualMachineScaleSetId);
}
/**
* Specifies whether VMAgent Platform Updates is enabled. Defaults to `false`.
*
*/
@Import(name="vmAgentPlatformUpdatesEnabled")
private @Nullable Output vmAgentPlatformUpdatesEnabled;
/**
* @return Specifies whether VMAgent Platform Updates is enabled. Defaults to `false`.
*
*/
public Optional> vmAgentPlatformUpdatesEnabled() {
return Optional.ofNullable(this.vmAgentPlatformUpdatesEnabled);
}
/**
* Specifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
@Import(name="vtpmEnabled")
private @Nullable Output vtpmEnabled;
/**
* @return Specifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
*/
public Optional> vtpmEnabled() {
return Optional.ofNullable(this.vtpmEnabled);
}
/**
* One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created.
*
*/
@Import(name="winrmListeners")
private @Nullable Output> winrmListeners;
/**
* @return One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created.
*
*/
public Optional>> winrmListeners() {
return Optional.ofNullable(this.winrmListeners);
}
/**
* * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created.
*
*/
@Import(name="zone")
private @Nullable Output zone;
/**
* @return * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created.
*
*/
public Optional> zone() {
return Optional.ofNullable(this.zone);
}
private WindowsVirtualMachineArgs() {}
private WindowsVirtualMachineArgs(WindowsVirtualMachineArgs $) {
this.additionalCapabilities = $.additionalCapabilities;
this.additionalUnattendContents = $.additionalUnattendContents;
this.adminPassword = $.adminPassword;
this.adminUsername = $.adminUsername;
this.allowExtensionOperations = $.allowExtensionOperations;
this.availabilitySetId = $.availabilitySetId;
this.bootDiagnostics = $.bootDiagnostics;
this.bypassPlatformSafetyChecksOnUserScheduleEnabled = $.bypassPlatformSafetyChecksOnUserScheduleEnabled;
this.capacityReservationGroupId = $.capacityReservationGroupId;
this.computerName = $.computerName;
this.customData = $.customData;
this.dedicatedHostGroupId = $.dedicatedHostGroupId;
this.dedicatedHostId = $.dedicatedHostId;
this.diskControllerType = $.diskControllerType;
this.edgeZone = $.edgeZone;
this.enableAutomaticUpdates = $.enableAutomaticUpdates;
this.encryptionAtHostEnabled = $.encryptionAtHostEnabled;
this.evictionPolicy = $.evictionPolicy;
this.extensionsTimeBudget = $.extensionsTimeBudget;
this.galleryApplications = $.galleryApplications;
this.hotpatchingEnabled = $.hotpatchingEnabled;
this.identity = $.identity;
this.licenseType = $.licenseType;
this.location = $.location;
this.maxBidPrice = $.maxBidPrice;
this.name = $.name;
this.networkInterfaceIds = $.networkInterfaceIds;
this.osDisk = $.osDisk;
this.osImageNotification = $.osImageNotification;
this.patchAssessmentMode = $.patchAssessmentMode;
this.patchMode = $.patchMode;
this.plan = $.plan;
this.platformFaultDomain = $.platformFaultDomain;
this.priority = $.priority;
this.provisionVmAgent = $.provisionVmAgent;
this.proximityPlacementGroupId = $.proximityPlacementGroupId;
this.rebootSetting = $.rebootSetting;
this.resourceGroupName = $.resourceGroupName;
this.secrets = $.secrets;
this.secureBootEnabled = $.secureBootEnabled;
this.size = $.size;
this.sourceImageId = $.sourceImageId;
this.sourceImageReference = $.sourceImageReference;
this.tags = $.tags;
this.terminationNotification = $.terminationNotification;
this.timezone = $.timezone;
this.userData = $.userData;
this.virtualMachineScaleSetId = $.virtualMachineScaleSetId;
this.vmAgentPlatformUpdatesEnabled = $.vmAgentPlatformUpdatesEnabled;
this.vtpmEnabled = $.vtpmEnabled;
this.winrmListeners = $.winrmListeners;
this.zone = $.zone;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WindowsVirtualMachineArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private WindowsVirtualMachineArgs $;
public Builder() {
$ = new WindowsVirtualMachineArgs();
}
public Builder(WindowsVirtualMachineArgs defaults) {
$ = new WindowsVirtualMachineArgs(Objects.requireNonNull(defaults));
}
/**
* @param additionalCapabilities A `additional_capabilities` block as defined below.
*
* @return builder
*
*/
public Builder additionalCapabilities(@Nullable Output additionalCapabilities) {
$.additionalCapabilities = additionalCapabilities;
return this;
}
/**
* @param additionalCapabilities A `additional_capabilities` block as defined below.
*
* @return builder
*
*/
public Builder additionalCapabilities(WindowsVirtualMachineAdditionalCapabilitiesArgs additionalCapabilities) {
return additionalCapabilities(Output.of(additionalCapabilities));
}
/**
* @param additionalUnattendContents One or more `additional_unattend_content` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder additionalUnattendContents(@Nullable Output> additionalUnattendContents) {
$.additionalUnattendContents = additionalUnattendContents;
return this;
}
/**
* @param additionalUnattendContents One or more `additional_unattend_content` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder additionalUnattendContents(List additionalUnattendContents) {
return additionalUnattendContents(Output.of(additionalUnattendContents));
}
/**
* @param additionalUnattendContents One or more `additional_unattend_content` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder additionalUnattendContents(WindowsVirtualMachineAdditionalUnattendContentArgs... additionalUnattendContents) {
return additionalUnattendContents(List.of(additionalUnattendContents));
}
/**
* @param adminPassword The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder adminPassword(Output adminPassword) {
$.adminPassword = adminPassword;
return this;
}
/**
* @param adminPassword The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder adminPassword(String adminPassword) {
return adminPassword(Output.of(adminPassword));
}
/**
* @param adminUsername The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder adminUsername(Output adminUsername) {
$.adminUsername = adminUsername;
return this;
}
/**
* @param adminUsername The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder adminUsername(String adminUsername) {
return adminUsername(Output.of(adminUsername));
}
/**
* @param allowExtensionOperations Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`.
*
* @return builder
*
*/
public Builder allowExtensionOperations(@Nullable Output allowExtensionOperations) {
$.allowExtensionOperations = allowExtensionOperations;
return this;
}
/**
* @param allowExtensionOperations Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`.
*
* @return builder
*
*/
public Builder allowExtensionOperations(Boolean allowExtensionOperations) {
return allowExtensionOperations(Output.of(allowExtensionOperations));
}
/**
* @param availabilitySetId Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder availabilitySetId(@Nullable Output availabilitySetId) {
$.availabilitySetId = availabilitySetId;
return this;
}
/**
* @param availabilitySetId Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder availabilitySetId(String availabilitySetId) {
return availabilitySetId(Output.of(availabilitySetId));
}
/**
* @param bootDiagnostics A `boot_diagnostics` block as defined below.
*
* @return builder
*
*/
public Builder bootDiagnostics(@Nullable Output bootDiagnostics) {
$.bootDiagnostics = bootDiagnostics;
return this;
}
/**
* @param bootDiagnostics A `boot_diagnostics` block as defined below.
*
* @return builder
*
*/
public Builder bootDiagnostics(WindowsVirtualMachineBootDiagnosticsArgs bootDiagnostics) {
return bootDiagnostics(Output.of(bootDiagnostics));
}
/**
* @param bypassPlatformSafetyChecksOnUserScheduleEnabled Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`.
*
* > **NOTE:** `bypass_platform_safety_checks_on_user_schedule_enabled` can only be set to `true` when `patch_mode` is set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder bypassPlatformSafetyChecksOnUserScheduleEnabled(@Nullable Output bypassPlatformSafetyChecksOnUserScheduleEnabled) {
$.bypassPlatformSafetyChecksOnUserScheduleEnabled = bypassPlatformSafetyChecksOnUserScheduleEnabled;
return this;
}
/**
* @param bypassPlatformSafetyChecksOnUserScheduleEnabled Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`.
*
* > **NOTE:** `bypass_platform_safety_checks_on_user_schedule_enabled` can only be set to `true` when `patch_mode` is set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder bypassPlatformSafetyChecksOnUserScheduleEnabled(Boolean bypassPlatformSafetyChecksOnUserScheduleEnabled) {
return bypassPlatformSafetyChecksOnUserScheduleEnabled(Output.of(bypassPlatformSafetyChecksOnUserScheduleEnabled));
}
/**
* @param capacityReservationGroupId Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to.
*
* > **NOTE:** `capacity_reservation_group_id` cannot be used with `availability_set_id` or `proximity_placement_group_id`
*
* @return builder
*
*/
public Builder capacityReservationGroupId(@Nullable Output capacityReservationGroupId) {
$.capacityReservationGroupId = capacityReservationGroupId;
return this;
}
/**
* @param capacityReservationGroupId Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to.
*
* > **NOTE:** `capacity_reservation_group_id` cannot be used with `availability_set_id` or `proximity_placement_group_id`
*
* @return builder
*
*/
public Builder capacityReservationGroupId(String capacityReservationGroupId) {
return capacityReservationGroupId(Output.of(capacityReservationGroupId));
}
/**
* @param computerName Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computer_name`, then you must specify `computer_name`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder computerName(@Nullable Output computerName) {
$.computerName = computerName;
return this;
}
/**
* @param computerName Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computer_name`, then you must specify `computer_name`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder computerName(String computerName) {
return computerName(Output.of(computerName));
}
/**
* @param customData The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder customData(@Nullable Output customData) {
$.customData = customData;
return this;
}
/**
* @param customData The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder customData(String customData) {
return customData(Output.of(customData));
}
/**
* @param dedicatedHostGroupId The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicated_host_id`.
*
* @return builder
*
*/
public Builder dedicatedHostGroupId(@Nullable Output dedicatedHostGroupId) {
$.dedicatedHostGroupId = dedicatedHostGroupId;
return this;
}
/**
* @param dedicatedHostGroupId The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicated_host_id`.
*
* @return builder
*
*/
public Builder dedicatedHostGroupId(String dedicatedHostGroupId) {
return dedicatedHostGroupId(Output.of(dedicatedHostGroupId));
}
/**
* @param dedicatedHostId The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicated_host_group_id`.
*
* @return builder
*
*/
public Builder dedicatedHostId(@Nullable Output dedicatedHostId) {
$.dedicatedHostId = dedicatedHostId;
return this;
}
/**
* @param dedicatedHostId The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicated_host_group_id`.
*
* @return builder
*
*/
public Builder dedicatedHostId(String dedicatedHostId) {
return dedicatedHostId(Output.of(dedicatedHostId));
}
/**
* @param diskControllerType Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`.
*
* @return builder
*
*/
public Builder diskControllerType(@Nullable Output diskControllerType) {
$.diskControllerType = diskControllerType;
return this;
}
/**
* @param diskControllerType Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`.
*
* @return builder
*
*/
public Builder diskControllerType(String diskControllerType) {
return diskControllerType(Output.of(diskControllerType));
}
/**
* @param edgeZone Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder edgeZone(@Nullable Output edgeZone) {
$.edgeZone = edgeZone;
return this;
}
/**
* @param edgeZone Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder edgeZone(String edgeZone) {
return edgeZone(Output.of(edgeZone));
}
/**
* @param enableAutomaticUpdates Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`.
*
* @return builder
*
*/
public Builder enableAutomaticUpdates(@Nullable Output enableAutomaticUpdates) {
$.enableAutomaticUpdates = enableAutomaticUpdates;
return this;
}
/**
* @param enableAutomaticUpdates Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`.
*
* @return builder
*
*/
public Builder enableAutomaticUpdates(Boolean enableAutomaticUpdates) {
return enableAutomaticUpdates(Output.of(enableAutomaticUpdates));
}
/**
* @param encryptionAtHostEnabled Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host?
*
* @return builder
*
*/
public Builder encryptionAtHostEnabled(@Nullable Output encryptionAtHostEnabled) {
$.encryptionAtHostEnabled = encryptionAtHostEnabled;
return this;
}
/**
* @param encryptionAtHostEnabled Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host?
*
* @return builder
*
*/
public Builder encryptionAtHostEnabled(Boolean encryptionAtHostEnabled) {
return encryptionAtHostEnabled(Output.of(encryptionAtHostEnabled));
}
/**
* @param evictionPolicy Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
* @return builder
*
*/
public Builder evictionPolicy(@Nullable Output evictionPolicy) {
$.evictionPolicy = evictionPolicy;
return this;
}
/**
* @param evictionPolicy Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
* @return builder
*
*/
public Builder evictionPolicy(String evictionPolicy) {
return evictionPolicy(Output.of(evictionPolicy));
}
/**
* @param extensionsTimeBudget Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
* @return builder
*
*/
public Builder extensionsTimeBudget(@Nullable Output extensionsTimeBudget) {
$.extensionsTimeBudget = extensionsTimeBudget;
return this;
}
/**
* @param extensionsTimeBudget Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`.
*
* @return builder
*
*/
public Builder extensionsTimeBudget(String extensionsTimeBudget) {
return extensionsTimeBudget(Output.of(extensionsTimeBudget));
}
/**
* @param galleryApplications One or more `gallery_application` blocks as defined below.
*
* > **Note** Gallery Application Assignments can be defined either directly on `azure.compute.WindowsVirtualMachine` resource, or using the `azure.compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `azure.compute.GalleryApplicationAssignment` is used, it's recommended to use `ignore_changes` for the `gallery_application` block on the corresponding `azure.compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource.
*
* @return builder
*
*/
public Builder galleryApplications(@Nullable Output> galleryApplications) {
$.galleryApplications = galleryApplications;
return this;
}
/**
* @param galleryApplications One or more `gallery_application` blocks as defined below.
*
* > **Note** Gallery Application Assignments can be defined either directly on `azure.compute.WindowsVirtualMachine` resource, or using the `azure.compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `azure.compute.GalleryApplicationAssignment` is used, it's recommended to use `ignore_changes` for the `gallery_application` block on the corresponding `azure.compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource.
*
* @return builder
*
*/
public Builder galleryApplications(List galleryApplications) {
return galleryApplications(Output.of(galleryApplications));
}
/**
* @param galleryApplications One or more `gallery_application` blocks as defined below.
*
* > **Note** Gallery Application Assignments can be defined either directly on `azure.compute.WindowsVirtualMachine` resource, or using the `azure.compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `azure.compute.GalleryApplicationAssignment` is used, it's recommended to use `ignore_changes` for the `gallery_application` block on the corresponding `azure.compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource.
*
* @return builder
*
*/
public Builder galleryApplications(WindowsVirtualMachineGalleryApplicationArgs... galleryApplications) {
return galleryApplications(List.of(galleryApplications));
}
/**
* @param hotpatchingEnabled Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch).
*
* > **NOTE:** Hotpatching can only be enabled if the `patch_mode` is set to `AutomaticByPlatform`, the `provision_vm_agent` is set to `true`, your `source_image_reference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatching_enabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository.
*
* @return builder
*
*/
public Builder hotpatchingEnabled(@Nullable Output hotpatchingEnabled) {
$.hotpatchingEnabled = hotpatchingEnabled;
return this;
}
/**
* @param hotpatchingEnabled Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch).
*
* > **NOTE:** Hotpatching can only be enabled if the `patch_mode` is set to `AutomaticByPlatform`, the `provision_vm_agent` is set to `true`, your `source_image_reference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatching_enabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository.
*
* @return builder
*
*/
public Builder hotpatchingEnabled(Boolean hotpatchingEnabled) {
return hotpatchingEnabled(Output.of(hotpatchingEnabled));
}
/**
* @param identity An `identity` block as defined below.
*
* @return builder
*
*/
public Builder identity(@Nullable Output identity) {
$.identity = identity;
return this;
}
/**
* @param identity An `identity` block as defined below.
*
* @return builder
*
*/
public Builder identity(WindowsVirtualMachineIdentityArgs identity) {
return identity(Output.of(identity));
}
/**
* @param licenseType Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
* @return builder
*
*/
public Builder licenseType(@Nullable Output licenseType) {
$.licenseType = licenseType;
return this;
}
/**
* @param licenseType Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`.
*
* @return builder
*
*/
public Builder licenseType(String licenseType) {
return licenseType(Output.of(licenseType));
}
/**
* @param location The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder location(@Nullable Output location) {
$.location = location;
return this;
}
/**
* @param location The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder location(String location) {
return location(Output.of(location));
}
/**
* @param maxBidPrice The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `eviction_policy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
* @return builder
*
*/
public Builder maxBidPrice(@Nullable Output maxBidPrice) {
$.maxBidPrice = maxBidPrice;
return this;
}
/**
* @param maxBidPrice The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `eviction_policy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons.
*
* > **NOTE:** This can only be configured when `priority` is set to `Spot`.
*
* @return builder
*
*/
public Builder maxBidPrice(Double maxBidPrice) {
return maxBidPrice(Output.of(maxBidPrice));
}
/**
* @param name The name of the Windows Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the Windows Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param networkInterfaceIds . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.
*
* @return builder
*
*/
public Builder networkInterfaceIds(Output> networkInterfaceIds) {
$.networkInterfaceIds = networkInterfaceIds;
return this;
}
/**
* @param networkInterfaceIds . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.
*
* @return builder
*
*/
public Builder networkInterfaceIds(List networkInterfaceIds) {
return networkInterfaceIds(Output.of(networkInterfaceIds));
}
/**
* @param networkInterfaceIds . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine.
*
* @return builder
*
*/
public Builder networkInterfaceIds(String... networkInterfaceIds) {
return networkInterfaceIds(List.of(networkInterfaceIds));
}
/**
* @param osDisk A `os_disk` block as defined below.
*
* @return builder
*
*/
public Builder osDisk(Output osDisk) {
$.osDisk = osDisk;
return this;
}
/**
* @param osDisk A `os_disk` block as defined below.
*
* @return builder
*
*/
public Builder osDisk(WindowsVirtualMachineOsDiskArgs osDisk) {
return osDisk(Output.of(osDisk));
}
/**
* @param osImageNotification A `os_image_notification` block as defined below.
*
* @return builder
*
*/
public Builder osImageNotification(@Nullable Output osImageNotification) {
$.osImageNotification = osImageNotification;
return this;
}
/**
* @param osImageNotification A `os_image_notification` block as defined below.
*
* @return builder
*
*/
public Builder osImageNotification(WindowsVirtualMachineOsImageNotificationArgs osImageNotification) {
return osImageNotification(Output.of(osImageNotification));
}
/**
* @param patchAssessmentMode Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`.
*
* > **NOTE:** If the `patch_assessment_mode` is set to `AutomaticByPlatform` then the `provision_vm_agent` field must be set to `true`.
*
* @return builder
*
*/
public Builder patchAssessmentMode(@Nullable Output patchAssessmentMode) {
$.patchAssessmentMode = patchAssessmentMode;
return this;
}
/**
* @param patchAssessmentMode Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`.
*
* > **NOTE:** If the `patch_assessment_mode` is set to `AutomaticByPlatform` then the `provision_vm_agent` field must be set to `true`.
*
* @return builder
*
*/
public Builder patchAssessmentMode(String patchAssessmentMode) {
return patchAssessmentMode(Output.of(patchAssessmentMode));
}
/**
* @param patchMode Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes).
*
* > **NOTE:** If `patch_mode` is set to `AutomaticByPlatform` then `provision_vm_agent` must also be set to `true`. If the Virtual Machine is using a hotpatching enabled image the `patch_mode` must always be set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder patchMode(@Nullable Output patchMode) {
$.patchMode = patchMode;
return this;
}
/**
* @param patchMode Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes).
*
* > **NOTE:** If `patch_mode` is set to `AutomaticByPlatform` then `provision_vm_agent` must also be set to `true`. If the Virtual Machine is using a hotpatching enabled image the `patch_mode` must always be set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder patchMode(String patchMode) {
return patchMode(Output.of(patchMode));
}
/**
* @param plan A `plan` block as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder plan(@Nullable Output plan) {
$.plan = plan;
return this;
}
/**
* @param plan A `plan` block as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder plan(WindowsVirtualMachinePlanArgs plan) {
return plan(Output.of(plan));
}
/**
* @param platformFaultDomain Specifies the Platform Fault Domain in which this Windows Virtual Machine should be created. Defaults to `-1`, which means this will be automatically assigned to a fault domain that best maintains balance across the available fault domains. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder platformFaultDomain(@Nullable Output platformFaultDomain) {
$.platformFaultDomain = platformFaultDomain;
return this;
}
/**
* @param platformFaultDomain Specifies the Platform Fault Domain in which this Windows Virtual Machine should be created. Defaults to `-1`, which means this will be automatically assigned to a fault domain that best maintains balance across the available fault domains. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder platformFaultDomain(Integer platformFaultDomain) {
return platformFaultDomain(Output.of(platformFaultDomain));
}
/**
* @param priority Specifies the priority of this Virtual Machine. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder priority(@Nullable Output priority) {
$.priority = priority;
return this;
}
/**
* @param priority Specifies the priority of this Virtual Machine. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder priority(String priority) {
return priority(Output.of(priority));
}
/**
* @param provisionVmAgent Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to `true`. Changing this forces a new resource to be created.
*
* > **NOTE:** If `provision_vm_agent` is set to `false` then `allow_extension_operations` must also be set to `false`.
*
* @return builder
*
*/
public Builder provisionVmAgent(@Nullable Output provisionVmAgent) {
$.provisionVmAgent = provisionVmAgent;
return this;
}
/**
* @param provisionVmAgent Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to `true`. Changing this forces a new resource to be created.
*
* > **NOTE:** If `provision_vm_agent` is set to `false` then `allow_extension_operations` must also be set to `false`.
*
* @return builder
*
*/
public Builder provisionVmAgent(Boolean provisionVmAgent) {
return provisionVmAgent(Output.of(provisionVmAgent));
}
/**
* @param proximityPlacementGroupId The ID of the Proximity Placement Group which the Virtual Machine should be assigned to.
*
* @return builder
*
*/
public Builder proximityPlacementGroupId(@Nullable Output proximityPlacementGroupId) {
$.proximityPlacementGroupId = proximityPlacementGroupId;
return this;
}
/**
* @param proximityPlacementGroupId The ID of the Proximity Placement Group which the Virtual Machine should be assigned to.
*
* @return builder
*
*/
public Builder proximityPlacementGroupId(String proximityPlacementGroupId) {
return proximityPlacementGroupId(Output.of(proximityPlacementGroupId));
}
/**
* @param rebootSetting Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`.
*
* > **NOTE:** `reboot_setting` can only be set when `patch_mode` is set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder rebootSetting(@Nullable Output rebootSetting) {
$.rebootSetting = rebootSetting;
return this;
}
/**
* @param rebootSetting Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`.
*
* > **NOTE:** `reboot_setting` can only be set when `patch_mode` is set to `AutomaticByPlatform`.
*
* @return builder
*
*/
public Builder rebootSetting(String rebootSetting) {
return rebootSetting(Output.of(rebootSetting));
}
/**
* @param resourceGroupName The name of the Resource Group in which the Windows Virtual Machine should be exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(Output resourceGroupName) {
$.resourceGroupName = resourceGroupName;
return this;
}
/**
* @param resourceGroupName The name of the Resource Group in which the Windows Virtual Machine should be exist. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder resourceGroupName(String resourceGroupName) {
return resourceGroupName(Output.of(resourceGroupName));
}
/**
* @param secrets One or more `secret` blocks as defined below.
*
* @return builder
*
*/
public Builder secrets(@Nullable Output> secrets) {
$.secrets = secrets;
return this;
}
/**
* @param secrets One or more `secret` blocks as defined below.
*
* @return builder
*
*/
public Builder secrets(List secrets) {
return secrets(Output.of(secrets));
}
/**
* @param secrets One or more `secret` blocks as defined below.
*
* @return builder
*
*/
public Builder secrets(WindowsVirtualMachineSecretArgs... secrets) {
return secrets(List.of(secrets));
}
/**
* @param secureBootEnabled Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder secureBootEnabled(@Nullable Output secureBootEnabled) {
$.secureBootEnabled = secureBootEnabled;
return this;
}
/**
* @param secureBootEnabled Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder secureBootEnabled(Boolean secureBootEnabled) {
return secureBootEnabled(Output.of(secureBootEnabled));
}
/**
* @param size The SKU which should be used for this Virtual Machine, such as `Standard_F2`.
*
* @return builder
*
*/
public Builder size(Output size) {
$.size = size;
return this;
}
/**
* @param size The SKU which should be used for this Virtual Machine, such as `Standard_F2`.
*
* @return builder
*
*/
public Builder size(String size) {
return size(Output.of(size));
}
/**
* @param sourceImageId The ID of the Image which this Virtual Machine should be created from. Changing this forces a new resource to be created. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
* @return builder
*
*/
public Builder sourceImageId(@Nullable Output sourceImageId) {
$.sourceImageId = sourceImageId;
return this;
}
/**
* @param sourceImageId The ID of the Image which this Virtual Machine should be created from. Changing this forces a new resource to be created. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
* @return builder
*
*/
public Builder sourceImageId(String sourceImageId) {
return sourceImageId(Output.of(sourceImageId));
}
/**
* @param sourceImageReference A `source_image_reference` block as defined below. Changing this forces a new resource to be created.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
* @return builder
*
*/
public Builder sourceImageReference(@Nullable Output sourceImageReference) {
$.sourceImageReference = sourceImageReference;
return this;
}
/**
* @param sourceImageReference A `source_image_reference` block as defined below. Changing this forces a new resource to be created.
*
* > **NOTE:** One of either `source_image_id` or `source_image_reference` must be set.
*
* @return builder
*
*/
public Builder sourceImageReference(WindowsVirtualMachineSourceImageReferenceArgs sourceImageReference) {
return sourceImageReference(Output.of(sourceImageReference));
}
/**
* @param tags A mapping of tags which should be assigned to this Virtual Machine.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags A mapping of tags which should be assigned to this Virtual Machine.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param terminationNotification A `termination_notification` block as defined below.
*
* @return builder
*
*/
public Builder terminationNotification(@Nullable Output terminationNotification) {
$.terminationNotification = terminationNotification;
return this;
}
/**
* @param terminationNotification A `termination_notification` block as defined below.
*
* @return builder
*
*/
public Builder terminationNotification(WindowsVirtualMachineTerminationNotificationArgs terminationNotification) {
return terminationNotification(Output.of(terminationNotification));
}
/**
* @param timezone Specifies the Time Zone which should be used by the Virtual Machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder timezone(@Nullable Output timezone) {
$.timezone = timezone;
return this;
}
/**
* @param timezone Specifies the Time Zone which should be used by the Virtual Machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder timezone(String timezone) {
return timezone(Output.of(timezone));
}
/**
* @param userData The Base64-Encoded User Data which should be used for this Virtual Machine.
*
* @return builder
*
*/
public Builder userData(@Nullable Output userData) {
$.userData = userData;
return this;
}
/**
* @param userData The Base64-Encoded User Data which should be used for this Virtual Machine.
*
* @return builder
*
*/
public Builder userData(String userData) {
return userData(Output.of(userData));
}
/**
* @param virtualMachineScaleSetId Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within.
*
* > **NOTE:** To update `virtual_machine_scale_set_id` the Preview Feature `Microsoft.Compute/SingleFDAttachDetachVMToVmss` needs to be enabled, see [the documentation](https://review.learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm#enroll-in-the-preview) for more information.
*
* > **NOTE:** Orchestrated Virtual Machine Scale Sets can be provisioned using [the `azure.compute.OrchestratedVirtualMachineScaleSet` resource](https://www.terraform.io/docs/providers/azurerm/r/orchestrated_virtual_machine_scale_set.html).
*
* > **NOTE:** To attach an existing VM to a Virtual Machine Scale Set, the scale set must have `single_placement_group` set to `false`, see [the documentation](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm?tabs=portal-1%2Cportal-2%2Cportal-3#limitations-for-attaching-an-existing-vm-to-a-scale-set) for more information.
*
* @return builder
*
*/
public Builder virtualMachineScaleSetId(@Nullable Output virtualMachineScaleSetId) {
$.virtualMachineScaleSetId = virtualMachineScaleSetId;
return this;
}
/**
* @param virtualMachineScaleSetId Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within.
*
* > **NOTE:** To update `virtual_machine_scale_set_id` the Preview Feature `Microsoft.Compute/SingleFDAttachDetachVMToVmss` needs to be enabled, see [the documentation](https://review.learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm#enroll-in-the-preview) for more information.
*
* > **NOTE:** Orchestrated Virtual Machine Scale Sets can be provisioned using [the `azure.compute.OrchestratedVirtualMachineScaleSet` resource](https://www.terraform.io/docs/providers/azurerm/r/orchestrated_virtual_machine_scale_set.html).
*
* > **NOTE:** To attach an existing VM to a Virtual Machine Scale Set, the scale set must have `single_placement_group` set to `false`, see [the documentation](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm?tabs=portal-1%2Cportal-2%2Cportal-3#limitations-for-attaching-an-existing-vm-to-a-scale-set) for more information.
*
* @return builder
*
*/
public Builder virtualMachineScaleSetId(String virtualMachineScaleSetId) {
return virtualMachineScaleSetId(Output.of(virtualMachineScaleSetId));
}
/**
* @param vmAgentPlatformUpdatesEnabled Specifies whether VMAgent Platform Updates is enabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder vmAgentPlatformUpdatesEnabled(@Nullable Output vmAgentPlatformUpdatesEnabled) {
$.vmAgentPlatformUpdatesEnabled = vmAgentPlatformUpdatesEnabled;
return this;
}
/**
* @param vmAgentPlatformUpdatesEnabled Specifies whether VMAgent Platform Updates is enabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder vmAgentPlatformUpdatesEnabled(Boolean vmAgentPlatformUpdatesEnabled) {
return vmAgentPlatformUpdatesEnabled(Output.of(vmAgentPlatformUpdatesEnabled));
}
/**
* @param vtpmEnabled Specifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder vtpmEnabled(@Nullable Output vtpmEnabled) {
$.vtpmEnabled = vtpmEnabled;
return this;
}
/**
* @param vtpmEnabled Specifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder vtpmEnabled(Boolean vtpmEnabled) {
return vtpmEnabled(Output.of(vtpmEnabled));
}
/**
* @param winrmListeners One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder winrmListeners(@Nullable Output> winrmListeners) {
$.winrmListeners = winrmListeners;
return this;
}
/**
* @param winrmListeners One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder winrmListeners(List winrmListeners) {
return winrmListeners(Output.of(winrmListeners));
}
/**
* @param winrmListeners One or more `winrm_listener` blocks as defined below. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder winrmListeners(WindowsVirtualMachineWinrmListenerArgs... winrmListeners) {
return winrmListeners(List.of(winrmListeners));
}
/**
* @param zone * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder zone(@Nullable Output zone) {
$.zone = zone;
return this;
}
/**
* @param zone * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created.
*
* @return builder
*
*/
public Builder zone(String zone) {
return zone(Output.of(zone));
}
public WindowsVirtualMachineArgs build() {
if ($.adminPassword == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "adminPassword");
}
if ($.adminUsername == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "adminUsername");
}
if ($.networkInterfaceIds == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "networkInterfaceIds");
}
if ($.osDisk == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "osDisk");
}
if ($.resourceGroupName == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "resourceGroupName");
}
if ($.size == null) {
throw new MissingRequiredPropertyException("WindowsVirtualMachineArgs", "size");
}
return $;
}
}
}