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.kotlin.VirtualMachineArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.compute.kotlin
import com.pulumi.azure.compute.VirtualMachineArgs.builder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineAdditionalCapabilitiesArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineAdditionalCapabilitiesArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineBootDiagnosticsArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineBootDiagnosticsArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineIdentityArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineIdentityArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileLinuxConfigArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileLinuxConfigArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileSecretArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileSecretArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileWindowsConfigArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileWindowsConfigArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachinePlanArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachinePlanArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageDataDiskArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageDataDiskArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageImageReferenceArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageImageReferenceArgsBuilder
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageOsDiskArgs
import com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageOsDiskArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Virtual Machine.
* ## Disclaimers
* > **Note:** The `azure.compute.VirtualMachine` resource has been superseded by the `azure.compute.LinuxVirtualMachine` and `azure.compute.WindowsVirtualMachine` resources. The existing `azure.compute.VirtualMachine` resource will continue to be available throughout the 2.x releases however is in a feature-frozen state to maintain compatibility - new functionality will instead be added to the `azure.compute.LinuxVirtualMachine` and `azure.compute.WindowsVirtualMachine` resources.
* > **Note:** Data Disks can be attached either directly on the `azure.compute.VirtualMachine` resource, or using the `azure.compute.DataDiskAttachment` resource - but the two cannot be used together. If both are used against the same Virtual Machine, spurious changes will occur.
* ## Example Usage
* ### From An Azure Platform Image)
* This example provisions a Virtual Machine with Managed Disks.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const config = new pulumi.Config();
* const prefix = config.get("prefix") || "tfvmex";
* const example = new azure.core.ResourceGroup("example", {
* name: `${prefix}-resources`,
* location: "West Europe",
* });
* const main = new azure.network.VirtualNetwork("main", {
* name: `${prefix}-network`,
* addressSpaces: ["10.0.0.0/16"],
* location: example.location,
* resourceGroupName: example.name,
* });
* const internal = new azure.network.Subnet("internal", {
* name: "internal",
* resourceGroupName: example.name,
* virtualNetworkName: main.name,
* addressPrefixes: ["10.0.2.0/24"],
* });
* const mainNetworkInterface = new azure.network.NetworkInterface("main", {
* name: `${prefix}-nic`,
* location: example.location,
* resourceGroupName: example.name,
* ipConfigurations: [{
* name: "testconfiguration1",
* subnetId: internal.id,
* privateIpAddressAllocation: "Dynamic",
* }],
* });
* const mainVirtualMachine = new azure.compute.VirtualMachine("main", {
* name: `${prefix}-vm`,
* location: example.location,
* resourceGroupName: example.name,
* networkInterfaceIds: [mainNetworkInterface.id],
* vmSize: "Standard_DS1_v2",
* storageImageReference: {
* publisher: "Canonical",
* offer: "0001-com-ubuntu-server-jammy",
* sku: "22_04-lts",
* version: "latest",
* },
* storageOsDisk: {
* name: "myosdisk1",
* caching: "ReadWrite",
* createOption: "FromImage",
* managedDiskType: "Standard_LRS",
* },
* osProfile: {
* computerName: "hostname",
* adminUsername: "testadmin",
* adminPassword: "Password1234!",
* },
* osProfileLinuxConfig: {
* disablePasswordAuthentication: false,
* },
* tags: {
* environment: "staging",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* config = pulumi.Config()
* prefix = config.get("prefix")
* if prefix is None:
* prefix = "tfvmex"
* example = azure.core.ResourceGroup("example",
* name=f"{prefix}-resources",
* location="West Europe")
* main = azure.network.VirtualNetwork("main",
* name=f"{prefix}-network",
* address_spaces=["10.0.0.0/16"],
* location=example.location,
* resource_group_name=example.name)
* internal = azure.network.Subnet("internal",
* name="internal",
* resource_group_name=example.name,
* virtual_network_name=main.name,
* address_prefixes=["10.0.2.0/24"])
* main_network_interface = azure.network.NetworkInterface("main",
* name=f"{prefix}-nic",
* location=example.location,
* resource_group_name=example.name,
* ip_configurations=[{
* "name": "testconfiguration1",
* "subnet_id": internal.id,
* "private_ip_address_allocation": "Dynamic",
* }])
* main_virtual_machine = azure.compute.VirtualMachine("main",
* name=f"{prefix}-vm",
* location=example.location,
* resource_group_name=example.name,
* network_interface_ids=[main_network_interface.id],
* vm_size="Standard_DS1_v2",
* storage_image_reference={
* "publisher": "Canonical",
* "offer": "0001-com-ubuntu-server-jammy",
* "sku": "22_04-lts",
* "version": "latest",
* },
* storage_os_disk={
* "name": "myosdisk1",
* "caching": "ReadWrite",
* "create_option": "FromImage",
* "managed_disk_type": "Standard_LRS",
* },
* os_profile={
* "computer_name": "hostname",
* "admin_username": "testadmin",
* "admin_password": "Password1234!",
* },
* os_profile_linux_config={
* "disable_password_authentication": False,
* },
* tags={
* "environment": "staging",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var config = new Config();
* var prefix = config.Get("prefix") ?? "tfvmex";
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = $"{prefix}-resources",
* Location = "West Europe",
* });
* var main = new Azure.Network.VirtualNetwork("main", new()
* {
* Name = $"{prefix}-network",
* AddressSpaces = new[]
* {
* "10.0.0.0/16",
* },
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var @internal = new Azure.Network.Subnet("internal", new()
* {
* Name = "internal",
* ResourceGroupName = example.Name,
* VirtualNetworkName = main.Name,
* AddressPrefixes = new[]
* {
* "10.0.2.0/24",
* },
* });
* var mainNetworkInterface = new Azure.Network.NetworkInterface("main", new()
* {
* Name = $"{prefix}-nic",
* Location = example.Location,
* ResourceGroupName = example.Name,
* IpConfigurations = new[]
* {
* new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
* {
* Name = "testconfiguration1",
* SubnetId = @internal.Id,
* PrivateIpAddressAllocation = "Dynamic",
* },
* },
* });
* var mainVirtualMachine = new Azure.Compute.VirtualMachine("main", new()
* {
* Name = $"{prefix}-vm",
* Location = example.Location,
* ResourceGroupName = example.Name,
* NetworkInterfaceIds = new[]
* {
* mainNetworkInterface.Id,
* },
* VmSize = "Standard_DS1_v2",
* StorageImageReference = new Azure.Compute.Inputs.VirtualMachineStorageImageReferenceArgs
* {
* Publisher = "Canonical",
* Offer = "0001-com-ubuntu-server-jammy",
* Sku = "22_04-lts",
* Version = "latest",
* },
* StorageOsDisk = new Azure.Compute.Inputs.VirtualMachineStorageOsDiskArgs
* {
* Name = "myosdisk1",
* Caching = "ReadWrite",
* CreateOption = "FromImage",
* ManagedDiskType = "Standard_LRS",
* },
* OsProfile = new Azure.Compute.Inputs.VirtualMachineOsProfileArgs
* {
* ComputerName = "hostname",
* AdminUsername = "testadmin",
* AdminPassword = "Password1234!",
* },
* OsProfileLinuxConfig = new Azure.Compute.Inputs.VirtualMachineOsProfileLinuxConfigArgs
* {
* DisablePasswordAuthentication = false,
* },
* Tags =
* {
* { "environment", "staging" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cfg := config.New(ctx, "")
* prefix := "tfvmex"
* if param := cfg.Get("prefix"); param != "" {
* prefix = param
* }
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.Sprintf("%v-resources", prefix),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* main, err := network.NewVirtualNetwork(ctx, "main", &network.VirtualNetworkArgs{
* Name: pulumi.Sprintf("%v-network", prefix),
* AddressSpaces: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{
* Name: pulumi.String("internal"),
* ResourceGroupName: example.Name,
* VirtualNetworkName: main.Name,
* AddressPrefixes: pulumi.StringArray{
* pulumi.String("10.0.2.0/24"),
* },
* })
* if err != nil {
* return err
* }
* mainNetworkInterface, err := network.NewNetworkInterface(ctx, "main", &network.NetworkInterfaceArgs{
* Name: pulumi.Sprintf("%v-nic", prefix),
* Location: example.Location,
* ResourceGroupName: example.Name,
* IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
* &network.NetworkInterfaceIpConfigurationArgs{
* Name: pulumi.String("testconfiguration1"),
* SubnetId: internal.ID(),
* PrivateIpAddressAllocation: pulumi.String("Dynamic"),
* },
* },
* })
* if err != nil {
* return err
* }
* _, err = compute.NewVirtualMachine(ctx, "main", &compute.VirtualMachineArgs{
* Name: pulumi.Sprintf("%v-vm", prefix),
* Location: example.Location,
* ResourceGroupName: example.Name,
* NetworkInterfaceIds: pulumi.StringArray{
* mainNetworkInterface.ID(),
* },
* VmSize: pulumi.String("Standard_DS1_v2"),
* StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{
* Publisher: pulumi.String("Canonical"),
* Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
* Sku: pulumi.String("22_04-lts"),
* Version: pulumi.String("latest"),
* },
* StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{
* Name: pulumi.String("myosdisk1"),
* Caching: pulumi.String("ReadWrite"),
* CreateOption: pulumi.String("FromImage"),
* ManagedDiskType: pulumi.String("Standard_LRS"),
* },
* OsProfile: &compute.VirtualMachineOsProfileArgs{
* ComputerName: pulumi.String("hostname"),
* AdminUsername: pulumi.String("testadmin"),
* AdminPassword: pulumi.String("Password1234!"),
* },
* OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{
* DisablePasswordAuthentication: pulumi.Bool(false),
* },
* Tags: pulumi.StringMap{
* "environment": pulumi.String("staging"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.network.VirtualNetwork;
* import com.pulumi.azure.network.VirtualNetworkArgs;
* import com.pulumi.azure.network.Subnet;
* import com.pulumi.azure.network.SubnetArgs;
* import com.pulumi.azure.network.NetworkInterface;
* import com.pulumi.azure.network.NetworkInterfaceArgs;
* import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
* import com.pulumi.azure.compute.VirtualMachine;
* import com.pulumi.azure.compute.VirtualMachineArgs;
* import com.pulumi.azure.compute.inputs.VirtualMachineStorageImageReferenceArgs;
* import com.pulumi.azure.compute.inputs.VirtualMachineStorageOsDiskArgs;
* import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileArgs;
* import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var config = ctx.config();
* final var prefix = config.get("prefix").orElse("tfvmex");
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name(String.format("%s-resources", prefix))
* .location("West Europe")
* .build());
* var main = new VirtualNetwork("main", VirtualNetworkArgs.builder()
* .name(String.format("%s-network", prefix))
* .addressSpaces("10.0.0.0/16")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var internal = new Subnet("internal", SubnetArgs.builder()
* .name("internal")
* .resourceGroupName(example.name())
* .virtualNetworkName(main.name())
* .addressPrefixes("10.0.2.0/24")
* .build());
* var mainNetworkInterface = new NetworkInterface("mainNetworkInterface", NetworkInterfaceArgs.builder()
* .name(String.format("%s-nic", prefix))
* .location(example.location())
* .resourceGroupName(example.name())
* .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
* .name("testconfiguration1")
* .subnetId(internal.id())
* .privateIpAddressAllocation("Dynamic")
* .build())
* .build());
* var mainVirtualMachine = new VirtualMachine("mainVirtualMachine", VirtualMachineArgs.builder()
* .name(String.format("%s-vm", prefix))
* .location(example.location())
* .resourceGroupName(example.name())
* .networkInterfaceIds(mainNetworkInterface.id())
* .vmSize("Standard_DS1_v2")
* .storageImageReference(VirtualMachineStorageImageReferenceArgs.builder()
* .publisher("Canonical")
* .offer("0001-com-ubuntu-server-jammy")
* .sku("22_04-lts")
* .version("latest")
* .build())
* .storageOsDisk(VirtualMachineStorageOsDiskArgs.builder()
* .name("myosdisk1")
* .caching("ReadWrite")
* .createOption("FromImage")
* .managedDiskType("Standard_LRS")
* .build())
* .osProfile(VirtualMachineOsProfileArgs.builder()
* .computerName("hostname")
* .adminUsername("testadmin")
* .adminPassword("Password1234!")
* .build())
* .osProfileLinuxConfig(VirtualMachineOsProfileLinuxConfigArgs.builder()
* .disablePasswordAuthentication(false)
* .build())
* .tags(Map.of("environment", "staging"))
* .build());
* }
* }
* ```
* ```yaml
* configuration:
* prefix:
* type: string
* default: tfvmex
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: ${prefix}-resources
* location: West Europe
* main:
* type: azure:network:VirtualNetwork
* properties:
* name: ${prefix}-network
* addressSpaces:
* - 10.0.0.0/16
* location: ${example.location}
* resourceGroupName: ${example.name}
* internal:
* type: azure:network:Subnet
* properties:
* name: internal
* resourceGroupName: ${example.name}
* virtualNetworkName: ${main.name}
* addressPrefixes:
* - 10.0.2.0/24
* mainNetworkInterface:
* type: azure:network:NetworkInterface
* name: main
* properties:
* name: ${prefix}-nic
* location: ${example.location}
* resourceGroupName: ${example.name}
* ipConfigurations:
* - name: testconfiguration1
* subnetId: ${internal.id}
* privateIpAddressAllocation: Dynamic
* mainVirtualMachine:
* type: azure:compute:VirtualMachine
* name: main
* properties:
* name: ${prefix}-vm
* location: ${example.location}
* resourceGroupName: ${example.name}
* networkInterfaceIds:
* - ${mainNetworkInterface.id}
* vmSize: Standard_DS1_v2
* storageImageReference:
* publisher: Canonical
* offer: 0001-com-ubuntu-server-jammy
* sku: 22_04-lts
* version: latest
* storageOsDisk:
* name: myosdisk1
* caching: ReadWrite
* createOption: FromImage
* managedDiskType: Standard_LRS
* osProfile:
* computerName: hostname
* adminUsername: testadmin
* adminPassword: Password1234!
* osProfileLinuxConfig:
* disablePasswordAuthentication: false
* tags:
* environment: staging
* ```
*
* ## Import
* Virtual Machines can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:compute/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/machine1
* ```
* @property additionalCapabilities An `additional_capabilities` block as defined below.
* @property availabilitySetId The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
* @property bootDiagnostics A `boot_diagnostics` block as defined below.
* @property deleteDataDisksOnTermination Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
* @property deleteOsDiskOnTermination Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
* @property identity An `identity` block as defined below.
* @property licenseType Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are `Windows_Client` and `Windows_Server`.
* @property location Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.
* @property name Specifies the name of the Virtual Machine. Changing this forces a new resource to be created.
* @property networkInterfaceIds A list of Network Interface IDs which should be associated with the Virtual Machine.
* @property osProfile An `os_profile` block as defined below. Required when `create_option` in the `storage_os_disk` block is set to `FromImage`.
* @property osProfileLinuxConfig (Required, when a Linux machine) An `os_profile_linux_config` block as defined below.
* @property osProfileSecrets One or more `os_profile_secrets` blocks as defined below.
* @property osProfileWindowsConfig (Required, when a Windows machine) An `os_profile_windows_config` block as defined below.
* @property plan A `plan` block as defined below.
* @property primaryNetworkInterfaceId The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.
* @property proximityPlacementGroupId The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
* @property resourceGroupName Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.
* @property storageDataDisks One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
* @property storageImageReference A `storage_image_reference` block as defined below. Changing this forces a new resource to be created.
* @property storageOsDisk A `storage_os_disk` block as defined below.
* @property tags A mapping of tags to assign to the Virtual Machine.
* @property vmSize Specifies the [size of the Virtual Machine](https://docs.microsoft.com/azure/virtual-machines/sizes-general). See also [Azure VM Naming Conventions](https://docs.microsoft.com/azure/virtual-machines/vm-naming-conventions).
* @property zones A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.
* > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
* For more information on the different example configurations, please check out the [Azure documentation](https://docs.microsoft.com/en-gb/rest/api/compute/virtualmachines/createorupdate#examples)
*/
public data class VirtualMachineArgs(
public val additionalCapabilities: Output? = null,
public val availabilitySetId: Output? = null,
public val bootDiagnostics: Output? = null,
public val deleteDataDisksOnTermination: Output? = null,
public val deleteOsDiskOnTermination: Output? = null,
public val identity: Output? = null,
public val licenseType: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val networkInterfaceIds: Output>? = null,
public val osProfile: Output? = null,
public val osProfileLinuxConfig: Output? = null,
public val osProfileSecrets: Output>? = null,
public val osProfileWindowsConfig: Output? = null,
public val plan: Output? = null,
public val primaryNetworkInterfaceId: Output? = null,
public val proximityPlacementGroupId: Output? = null,
public val resourceGroupName: Output? = null,
public val storageDataDisks: Output>? = null,
public val storageImageReference: Output? = null,
public val storageOsDisk: Output? = null,
public val tags: Output>? = null,
public val vmSize: Output? = null,
public val zones: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.compute.VirtualMachineArgs =
com.pulumi.azure.compute.VirtualMachineArgs.builder()
.additionalCapabilities(
additionalCapabilities?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.availabilitySetId(availabilitySetId?.applyValue({ args0 -> args0 }))
.bootDiagnostics(bootDiagnostics?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deleteDataDisksOnTermination(deleteDataDisksOnTermination?.applyValue({ args0 -> args0 }))
.deleteOsDiskOnTermination(deleteOsDiskOnTermination?.applyValue({ args0 -> args0 }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.licenseType(licenseType?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.networkInterfaceIds(networkInterfaceIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.osProfile(osProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.osProfileLinuxConfig(
osProfileLinuxConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.osProfileSecrets(
osProfileSecrets?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.osProfileWindowsConfig(
osProfileWindowsConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.plan(plan?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.primaryNetworkInterfaceId(primaryNetworkInterfaceId?.applyValue({ args0 -> args0 }))
.proximityPlacementGroupId(proximityPlacementGroupId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.storageDataDisks(
storageDataDisks?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.storageImageReference(
storageImageReference?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.storageOsDisk(storageOsDisk?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.vmSize(vmSize?.applyValue({ args0 -> args0 }))
.zones(zones?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VirtualMachineArgs].
*/
@PulumiTagMarker
public class VirtualMachineArgsBuilder internal constructor() {
private var additionalCapabilities: Output? = null
private var availabilitySetId: Output? = null
private var bootDiagnostics: Output? = null
private var deleteDataDisksOnTermination: Output? = null
private var deleteOsDiskOnTermination: Output? = null
private var identity: Output? = null
private var licenseType: Output? = null
private var location: Output? = null
private var name: Output? = null
private var networkInterfaceIds: Output>? = null
private var osProfile: Output? = null
private var osProfileLinuxConfig: Output? = null
private var osProfileSecrets: Output>? = null
private var osProfileWindowsConfig: Output? = null
private var plan: Output? = null
private var primaryNetworkInterfaceId: Output? = null
private var proximityPlacementGroupId: Output? = null
private var resourceGroupName: Output? = null
private var storageDataDisks: Output>? = null
private var storageImageReference: Output? = null
private var storageOsDisk: Output? = null
private var tags: Output>? = null
private var vmSize: Output? = null
private var zones: Output? = null
/**
* @param value An `additional_capabilities` block as defined below.
*/
@JvmName("orbaksmloftmumjv")
public suspend fun additionalCapabilities(`value`: Output) {
this.additionalCapabilities = value
}
/**
* @param value The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*/
@JvmName("cnjruforncekvbxy")
public suspend fun availabilitySetId(`value`: Output) {
this.availabilitySetId = value
}
/**
* @param value A `boot_diagnostics` block as defined below.
*/
@JvmName("kctjsjoejxstpket")
public suspend fun bootDiagnostics(`value`: Output) {
this.bootDiagnostics = value
}
/**
* @param value Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
*/
@JvmName("rvujbhlqtobdcton")
public suspend fun deleteDataDisksOnTermination(`value`: Output) {
this.deleteDataDisksOnTermination = value
}
/**
* @param value Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
*/
@JvmName("npywrfqsnqudbbje")
public suspend fun deleteOsDiskOnTermination(`value`: Output) {
this.deleteOsDiskOnTermination = value
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("aqxvbvhjcovugoot")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are `Windows_Client` and `Windows_Server`.
*/
@JvmName("jkjhybkwmvgombgd")
public suspend fun licenseType(`value`: Output) {
this.licenseType = value
}
/**
* @param value Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.
*/
@JvmName("nihyejvpactohlib")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name of the Virtual Machine. Changing this forces a new resource to be created.
*/
@JvmName("drtqmbomlamrpatd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A list of Network Interface IDs which should be associated with the Virtual Machine.
*/
@JvmName("anneplvkcwxbpejn")
public suspend fun networkInterfaceIds(`value`: Output>) {
this.networkInterfaceIds = value
}
@JvmName("umcfittwhtqdwndq")
public suspend fun networkInterfaceIds(vararg values: Output) {
this.networkInterfaceIds = Output.all(values.asList())
}
/**
* @param values A list of Network Interface IDs which should be associated with the Virtual Machine.
*/
@JvmName("clyuladnmbcdylng")
public suspend fun networkInterfaceIds(values: List>) {
this.networkInterfaceIds = Output.all(values)
}
/**
* @param value An `os_profile` block as defined below. Required when `create_option` in the `storage_os_disk` block is set to `FromImage`.
*/
@JvmName("ybejlwckgapmnwxd")
public suspend fun osProfile(`value`: Output) {
this.osProfile = value
}
/**
* @param value (Required, when a Linux machine) An `os_profile_linux_config` block as defined below.
*/
@JvmName("xsrndxdiedcxksvo")
public suspend fun osProfileLinuxConfig(`value`: Output) {
this.osProfileLinuxConfig = value
}
/**
* @param value One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("acyrutyblqolffjd")
public suspend fun osProfileSecrets(`value`: Output>) {
this.osProfileSecrets = value
}
@JvmName("slyrybdiigjntuer")
public suspend fun osProfileSecrets(vararg values: Output) {
this.osProfileSecrets = Output.all(values.asList())
}
/**
* @param values One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("bhvkftiyistiqjet")
public suspend fun osProfileSecrets(values: List>) {
this.osProfileSecrets = Output.all(values)
}
/**
* @param value (Required, when a Windows machine) An `os_profile_windows_config` block as defined below.
*/
@JvmName("tsnjduxcqpbqpurb")
public suspend fun osProfileWindowsConfig(`value`: Output) {
this.osProfileWindowsConfig = value
}
/**
* @param value A `plan` block as defined below.
*/
@JvmName("baojwkbumnsrphtp")
public suspend fun plan(`value`: Output) {
this.plan = value
}
/**
* @param value The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.
*/
@JvmName("kxmlhjxmwblqcihv")
public suspend fun primaryNetworkInterfaceId(`value`: Output) {
this.primaryNetworkInterfaceId = value
}
/**
* @param value The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
*/
@JvmName("hgwhjbxltpswfsnd")
public suspend fun proximityPlacementGroupId(`value`: Output) {
this.proximityPlacementGroupId = value
}
/**
* @param value Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*/
@JvmName("gutagnmvpoyjeafe")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("xtgawnwdnarjlnah")
public suspend fun storageDataDisks(`value`: Output>) {
this.storageDataDisks = value
}
@JvmName("rdiymkghyiolovaj")
public suspend fun storageDataDisks(vararg values: Output) {
this.storageDataDisks = Output.all(values.asList())
}
/**
* @param values One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("kiuwletsiaqitadt")
public suspend fun storageDataDisks(values: List>) {
this.storageDataDisks = Output.all(values)
}
/**
* @param value A `storage_image_reference` block as defined below. Changing this forces a new resource to be created.
*/
@JvmName("flkoxexdxssvyvdr")
public suspend fun storageImageReference(`value`: Output) {
this.storageImageReference = value
}
/**
* @param value A `storage_os_disk` block as defined below.
*/
@JvmName("bfdimgpkhdhfbmtr")
public suspend fun storageOsDisk(`value`: Output) {
this.storageOsDisk = value
}
/**
* @param value A mapping of tags to assign to the Virtual Machine.
*/
@JvmName("hinrxleusqxtnhox")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Specifies the [size of the Virtual Machine](https://docs.microsoft.com/azure/virtual-machines/sizes-general). See also [Azure VM Naming Conventions](https://docs.microsoft.com/azure/virtual-machines/vm-naming-conventions).
*/
@JvmName("lejwdjhhqiesjoul")
public suspend fun vmSize(`value`: Output) {
this.vmSize = value
}
/**
* @param value A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.
* > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
* For more information on the different example configurations, please check out the [Azure documentation](https://docs.microsoft.com/en-gb/rest/api/compute/virtualmachines/createorupdate#examples)
*/
@JvmName("gbrvoiwohwpqjvhl")
public suspend fun zones(`value`: Output) {
this.zones = value
}
/**
* @param value An `additional_capabilities` block as defined below.
*/
@JvmName("rtabfjltxylndmhm")
public suspend fun additionalCapabilities(`value`: VirtualMachineAdditionalCapabilitiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.additionalCapabilities = mapped
}
/**
* @param argument An `additional_capabilities` block as defined below.
*/
@JvmName("fflpjtkdfjvlphab")
public suspend fun additionalCapabilities(argument: suspend VirtualMachineAdditionalCapabilitiesArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineAdditionalCapabilitiesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.additionalCapabilities = mapped
}
/**
* @param value The ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*/
@JvmName("iwrnekwddqfeysgl")
public suspend fun availabilitySetId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilitySetId = mapped
}
/**
* @param value A `boot_diagnostics` block as defined below.
*/
@JvmName("otglfrossmhyfhjk")
public suspend fun bootDiagnostics(`value`: VirtualMachineBootDiagnosticsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bootDiagnostics = mapped
}
/**
* @param argument A `boot_diagnostics` block as defined below.
*/
@JvmName("svosuwivctrmgwyk")
public suspend fun bootDiagnostics(argument: suspend VirtualMachineBootDiagnosticsArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineBootDiagnosticsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.bootDiagnostics = mapped
}
/**
* @param value Should the Data Disks (either the Managed Disks / VHD Blobs) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
*/
@JvmName("bxhdovebvausxbwe")
public suspend fun deleteDataDisksOnTermination(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteDataDisksOnTermination = mapped
}
/**
* @param value Should the OS Disk (either the Managed Disk / VHD Blob) be deleted when the Virtual Machine is destroyed? Defaults to `false`.
* > **Note:** This setting works when instance is deleted via the provider only and don't forget to delete disks manually if you deleted VM manually. It can increase spending.
*/
@JvmName("dbdvrwnpwynjawqa")
public suspend fun deleteOsDiskOnTermination(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteOsDiskOnTermination = mapped
}
/**
* @param value An `identity` block as defined below.
*/
@JvmName("mpanenujhtyprjoh")
public suspend fun identity(`value`: VirtualMachineIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument An `identity` block as defined below.
*/
@JvmName("wpmoikpwrtmswjii")
public suspend fun identity(argument: suspend VirtualMachineIdentityArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Specifies the BYOL Type for this Virtual Machine. This is only applicable to Windows Virtual Machines. Possible values are `Windows_Client` and `Windows_Server`.
*/
@JvmName("qkfdiedpxdbnhwhd")
public suspend fun licenseType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.licenseType = mapped
}
/**
* @param value Specifies the Azure Region where the Virtual Machine exists. Changing this forces a new resource to be created.
*/
@JvmName("gnopstfdwjghlrcf")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the name of the Virtual Machine. Changing this forces a new resource to be created.
*/
@JvmName("dpkjpxsdmcxrjsam")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A list of Network Interface IDs which should be associated with the Virtual Machine.
*/
@JvmName("kxvnmgbooehgpvbg")
public suspend fun networkInterfaceIds(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkInterfaceIds = mapped
}
/**
* @param values A list of Network Interface IDs which should be associated with the Virtual Machine.
*/
@JvmName("bqforsnxqqkjmxyh")
public suspend fun networkInterfaceIds(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkInterfaceIds = mapped
}
/**
* @param value An `os_profile` block as defined below. Required when `create_option` in the `storage_os_disk` block is set to `FromImage`.
*/
@JvmName("ggsewjtaibsbdrwy")
public suspend fun osProfile(`value`: VirtualMachineOsProfileArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osProfile = mapped
}
/**
* @param argument An `os_profile` block as defined below. Required when `create_option` in the `storage_os_disk` block is set to `FromImage`.
*/
@JvmName("wawexnydwoxeinkd")
public suspend fun osProfile(argument: suspend VirtualMachineOsProfileArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineOsProfileArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.osProfile = mapped
}
/**
* @param value (Required, when a Linux machine) An `os_profile_linux_config` block as defined below.
*/
@JvmName("rfwhyxwpseahprqs")
public suspend fun osProfileLinuxConfig(`value`: VirtualMachineOsProfileLinuxConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osProfileLinuxConfig = mapped
}
/**
* @param argument (Required, when a Linux machine) An `os_profile_linux_config` block as defined below.
*/
@JvmName("xbrgegjeojwwwllr")
public suspend fun osProfileLinuxConfig(argument: suspend VirtualMachineOsProfileLinuxConfigArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineOsProfileLinuxConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.osProfileLinuxConfig = mapped
}
/**
* @param value One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("iqjdggdabcjexsfy")
public suspend fun osProfileSecrets(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osProfileSecrets = mapped
}
/**
* @param argument One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("ygxymmdhxsssrmps")
public suspend fun osProfileSecrets(argument: List Unit>) {
val toBeMapped = argument.toList().map {
VirtualMachineOsProfileSecretArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.osProfileSecrets = mapped
}
/**
* @param argument One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("momseoxyojieummc")
public suspend fun osProfileSecrets(vararg argument: suspend VirtualMachineOsProfileSecretArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
VirtualMachineOsProfileSecretArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.osProfileSecrets = mapped
}
/**
* @param argument One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("ptsmdfqoloysgkhq")
public suspend fun osProfileSecrets(argument: suspend VirtualMachineOsProfileSecretArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
VirtualMachineOsProfileSecretArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.osProfileSecrets = mapped
}
/**
* @param values One or more `os_profile_secrets` blocks as defined below.
*/
@JvmName("cdasasahvwpopvat")
public suspend fun osProfileSecrets(vararg values: VirtualMachineOsProfileSecretArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.osProfileSecrets = mapped
}
/**
* @param value (Required, when a Windows machine) An `os_profile_windows_config` block as defined below.
*/
@JvmName("poruaecbgexrbiqc")
public suspend fun osProfileWindowsConfig(`value`: VirtualMachineOsProfileWindowsConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osProfileWindowsConfig = mapped
}
/**
* @param argument (Required, when a Windows machine) An `os_profile_windows_config` block as defined below.
*/
@JvmName("epvldqbuujxdcxbb")
public suspend fun osProfileWindowsConfig(argument: suspend VirtualMachineOsProfileWindowsConfigArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineOsProfileWindowsConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.osProfileWindowsConfig = mapped
}
/**
* @param value A `plan` block as defined below.
*/
@JvmName("maporliwwivriwsd")
public suspend fun plan(`value`: VirtualMachinePlanArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.plan = mapped
}
/**
* @param argument A `plan` block as defined below.
*/
@JvmName("vupvuonuahguvkxw")
public suspend fun plan(argument: suspend VirtualMachinePlanArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachinePlanArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.plan = mapped
}
/**
* @param value The ID of the Network Interface (which must be attached to the Virtual Machine) which should be the Primary Network Interface for this Virtual Machine.
*/
@JvmName("cbwausbgwvyxrcov")
public suspend fun primaryNetworkInterfaceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.primaryNetworkInterfaceId = mapped
}
/**
* @param value The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created
*/
@JvmName("akmcponkmmxjfvxn")
public suspend fun proximityPlacementGroupId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.proximityPlacementGroupId = mapped
}
/**
* @param value Specifies the name of the Resource Group in which the Virtual Machine should exist. Changing this forces a new resource to be created.
*/
@JvmName("pubicjgbolmijnuj")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("akmuyrssnbkewjoo")
public suspend fun storageDataDisks(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageDataDisks = mapped
}
/**
* @param argument One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("psygsbmewdxuhqgh")
public suspend fun storageDataDisks(argument: List Unit>) {
val toBeMapped = argument.toList().map {
VirtualMachineStorageDataDiskArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.storageDataDisks = mapped
}
/**
* @param argument One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("hwxcysjfjqnwmlbw")
public suspend fun storageDataDisks(vararg argument: suspend VirtualMachineStorageDataDiskArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
VirtualMachineStorageDataDiskArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.storageDataDisks = mapped
}
/**
* @param argument One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("fylwcuoxxgreapje")
public suspend fun storageDataDisks(argument: suspend VirtualMachineStorageDataDiskArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
VirtualMachineStorageDataDiskArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.storageDataDisks = mapped
}
/**
* @param values One or more `storage_data_disk` blocks as defined below.
* > **Please Note:** Data Disks can also be attached either using this block or the `azure.compute.DataDiskAttachment` resource - but not both.
*/
@JvmName("yvquypdjfggusiox")
public suspend fun storageDataDisks(vararg values: VirtualMachineStorageDataDiskArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageDataDisks = mapped
}
/**
* @param value A `storage_image_reference` block as defined below. Changing this forces a new resource to be created.
*/
@JvmName("ijidtckmrpqvospx")
public suspend fun storageImageReference(`value`: VirtualMachineStorageImageReferenceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageImageReference = mapped
}
/**
* @param argument A `storage_image_reference` block as defined below. Changing this forces a new resource to be created.
*/
@JvmName("obqmmilvbcjctaxf")
public suspend fun storageImageReference(argument: suspend VirtualMachineStorageImageReferenceArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineStorageImageReferenceArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.storageImageReference = mapped
}
/**
* @param value A `storage_os_disk` block as defined below.
*/
@JvmName("rbyrqblqesjhcaop")
public suspend fun storageOsDisk(`value`: VirtualMachineStorageOsDiskArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.storageOsDisk = mapped
}
/**
* @param argument A `storage_os_disk` block as defined below.
*/
@JvmName("veadkficrkvuffro")
public suspend fun storageOsDisk(argument: suspend VirtualMachineStorageOsDiskArgsBuilder.() -> Unit) {
val toBeMapped = VirtualMachineStorageOsDiskArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.storageOsDisk = mapped
}
/**
* @param value A mapping of tags to assign to the Virtual Machine.
*/
@JvmName("thfpbovllscftpvd")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags to assign to the Virtual Machine.
*/
@JvmName("hyxncyywdwohwxax")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Specifies the [size of the Virtual Machine](https://docs.microsoft.com/azure/virtual-machines/sizes-general). See also [Azure VM Naming Conventions](https://docs.microsoft.com/azure/virtual-machines/vm-naming-conventions).
*/
@JvmName("soodenlsonnpghyf")
public suspend fun vmSize(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vmSize = mapped
}
/**
* @param value A list of a single item of the Availability Zone which the Virtual Machine should be allocated in. Changing this forces a new resource to be created.
* > **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
* For more information on the different example configurations, please check out the [Azure documentation](https://docs.microsoft.com/en-gb/rest/api/compute/virtualmachines/createorupdate#examples)
*/
@JvmName("iwyomvhkrwfhfjww")
public suspend fun zones(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zones = mapped
}
internal fun build(): VirtualMachineArgs = VirtualMachineArgs(
additionalCapabilities = additionalCapabilities,
availabilitySetId = availabilitySetId,
bootDiagnostics = bootDiagnostics,
deleteDataDisksOnTermination = deleteDataDisksOnTermination,
deleteOsDiskOnTermination = deleteOsDiskOnTermination,
identity = identity,
licenseType = licenseType,
location = location,
name = name,
networkInterfaceIds = networkInterfaceIds,
osProfile = osProfile,
osProfileLinuxConfig = osProfileLinuxConfig,
osProfileSecrets = osProfileSecrets,
osProfileWindowsConfig = osProfileWindowsConfig,
plan = plan,
primaryNetworkInterfaceId = primaryNetworkInterfaceId,
proximityPlacementGroupId = proximityPlacementGroupId,
resourceGroupName = resourceGroupName,
storageDataDisks = storageDataDisks,
storageImageReference = storageImageReference,
storageOsDisk = storageOsDisk,
tags = tags,
vmSize = vmSize,
zones = zones,
)
}