published on Saturday, May 9, 2026 by Pulumi
published on Saturday, May 9, 2026 by Pulumi
Describes a Virtual Machine Scale Set.
Uses Azure REST API version 2024-11-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01.
Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native compute [ApiVersion]. See the version guide for details.
Example Usage
Create a VMSS with an extension that has suppressFailures enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = true,
StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
{
Extensions = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
{
AutoUpgradeMinorVersion = false,
Name = "{extension-name}",
Publisher = "{extension-Publisher}",
Settings = null,
SuppressFailures = true,
Type = "{extension-Type}",
TypeHandlerVersion = "{handler-version}",
},
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(true),
StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
},
},
ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
&compute.VirtualMachineScaleSetExtensionTypeArgs{
AutoUpgradeMinorVersion: pulumi.Bool(false),
Name: pulumi.String("{extension-name}"),
Publisher: pulumi.String("{extension-Publisher}"),
Settings: pulumi.Any(map[string]interface{}{}),
SuppressFailures: pulumi.Bool(true),
Type: pulumi.String("{extension-Type}"),
TypeHandlerVersion: pulumi.String("{handler-version}"),
},
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetExtensionProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(true)
.storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
.build())
.build())
.extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
.extensions(VirtualMachineScaleSetExtensionArgs.builder()
.autoUpgradeMinorVersion(false)
.name("{extension-name}")
.publisher("{extension-Publisher}")
.settings(Map.ofEntries(
))
.suppressFailures(true)
.type("{extension-Type}")
.typeHandlerVersion("{handler-version}")
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
diagnosticsProfile: {
bootDiagnostics: {
enabled: true,
storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
extensionProfile: {
extensions: [{
autoUpgradeMinorVersion: false,
name: "{extension-name}",
publisher: "{extension-Publisher}",
settings: {},
suppressFailures: true,
type: "{extension-Type}",
typeHandlerVersion: "{handler-version}",
}],
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": True,
"storage_uri": "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
"extension_profile": {
"extensions": [{
"auto_upgrade_minor_version": False,
"name": "{extension-name}",
"publisher": "{extension-Publisher}",
"settings": {},
"suppress_failures": True,
"type": "{extension-Type}",
"type_handler_version": "{handler-version}",
}],
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
diagnosticsProfile:
bootDiagnostics:
enabled: true
storageUri: http://{existing-storage-account-name}.blob.core.windows.net
extensionProfile:
extensions:
- autoUpgradeMinorVersion: false
name: '{extension-name}'
publisher: '{extension-Publisher}'
settings: {}
suppressFailures: true
type: '{extension-Type}'
typeHandlerVersion: '{handler-version}'
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a VMSS with an extension with protectedSettingsFromKeyVault
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = true,
StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
{
Extensions = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
{
AutoUpgradeMinorVersion = false,
Name = "{extension-name}",
ProtectedSettingsFromKeyVault = new AzureNative.Compute.Inputs.KeyVaultSecretReferenceArgs
{
SecretUrl = "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
SourceVault = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
},
},
Publisher = "{extension-Publisher}",
Settings = null,
Type = "{extension-Type}",
TypeHandlerVersion = "{handler-version}",
},
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(true),
StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
},
},
ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
&compute.VirtualMachineScaleSetExtensionTypeArgs{
AutoUpgradeMinorVersion: pulumi.Bool(false),
Name: pulumi.String("{extension-name}"),
ProtectedSettingsFromKeyVault: &compute.KeyVaultSecretReferenceArgs{
SecretUrl: pulumi.String("https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"),
SourceVault: &compute.SubResourceArgs{
Id: pulumi.String("/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"),
},
},
Publisher: pulumi.String("{extension-Publisher}"),
Settings: pulumi.Any(map[string]interface{}{}),
Type: pulumi.String("{extension-Type}"),
TypeHandlerVersion: pulumi.String("{handler-version}"),
},
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetExtensionProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(true)
.storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
.build())
.build())
.extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
.extensions(VirtualMachineScaleSetExtensionArgs.builder()
.autoUpgradeMinorVersion(false)
.name("{extension-name}")
.protectedSettingsFromKeyVault(KeyVaultSecretReferenceArgs.builder()
.secretUrl("https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e")
.sourceVault(SubResourceArgs.builder()
.id("/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName")
.build())
.build())
.publisher("{extension-Publisher}")
.settings(Map.ofEntries(
))
.type("{extension-Type}")
.typeHandlerVersion("{handler-version}")
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
diagnosticsProfile: {
bootDiagnostics: {
enabled: true,
storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
extensionProfile: {
extensions: [{
autoUpgradeMinorVersion: false,
name: "{extension-name}",
protectedSettingsFromKeyVault: {
secretUrl: "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
sourceVault: {
id: "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
},
},
publisher: "{extension-Publisher}",
settings: {},
type: "{extension-Type}",
typeHandlerVersion: "{handler-version}",
}],
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": True,
"storage_uri": "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
"extension_profile": {
"extensions": [{
"auto_upgrade_minor_version": False,
"name": "{extension-name}",
"protected_settings_from_key_vault": {
"secret_url": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e",
"source_vault": {
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName",
},
},
"publisher": "{extension-Publisher}",
"settings": {},
"type": "{extension-Type}",
"type_handler_version": "{handler-version}",
}],
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
diagnosticsProfile:
bootDiagnostics:
enabled: true
storageUri: http://{existing-storage-account-name}.blob.core.windows.net
extensionProfile:
extensions:
- autoUpgradeMinorVersion: false
name: '{extension-name}'
protectedSettingsFromKeyVault:
secretUrl: https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e
sourceVault:
id: /subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName
publisher: '{extension-Publisher}'
settings: {}
type: '{extension-Type}'
typeHandlerVersion: '{handler-version}'
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a custom-image scale set from an unmanaged generalized os image.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
Image = new AzureNative.Compute.Inputs.VirtualHardDiskArgs
{
Uri = "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
},
Name = "osDisk",
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
Image: &compute.VirtualHardDiskArgs{
Uri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd"),
},
Name: pulumi.String("osDisk"),
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualHardDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.image(VirtualHardDiskArgs.builder()
.uri("http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd")
.build())
.name("osDisk")
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
image: {
uri: "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
},
name: "osDisk",
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"image": {
"uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd",
},
"name": "osDisk",
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
osDisk:
caching: ReadWrite
createOption: FromImage
image:
uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd
name: osDisk
vmScaleSetName: '{vmss-name}'
Create a platform-image scale set with unmanaged os disks.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
Name = "osDisk",
VhdContainers = new[]
{
"http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
Name: pulumi.String("osDisk"),
VhdContainers: pulumi.StringArray{
pulumi.String("http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer"),
pulumi.String("http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer"),
pulumi.String("http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer"),
pulumi.String("http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer"),
pulumi.String("http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer"),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.name("osDisk")
.vhdContainers(
"http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer")
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
name: "osDisk",
vhdContainers: [
"http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
],
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"name": "osDisk",
"vhd_containers": [
"http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer",
"http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer",
],
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
name: osDisk
vhdContainers:
- http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer
- http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer
- http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer
- http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer
- http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer
vmScaleSetName: '{vmss-name}'
Create a scale set from a custom image.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set from a generalized shared image.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set from a specialized shared image.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set where nic config has DisableTcpStateTracking property
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
DisableTcpStateTracking = true,
EnableAcceleratedNetworking = true,
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{nicConfig1-name}",
Primary = true,
},
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
DisableTcpStateTracking = false,
EnableAcceleratedNetworking = false,
EnableIPForwarding = false,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{nicConfig2-name}",
Primary = true,
PrivateIPAddressVersion = AzureNative.Compute.IPVersion.IPv4,
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
},
},
Name = "{nicConfig2-name}",
Primary = false,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
DisableTcpStateTracking: pulumi.Bool(true),
EnableAcceleratedNetworking: pulumi.Bool(true),
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{nicConfig1-name}"),
Primary: pulumi.Bool(true),
},
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
DisableTcpStateTracking: pulumi.Bool(false),
EnableAcceleratedNetworking: pulumi.Bool(false),
EnableIPForwarding: pulumi.Bool(false),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{nicConfig2-name}"),
Primary: pulumi.Bool(true),
PrivateIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"),
},
},
},
Name: pulumi.String("{nicConfig2-name}"),
Primary: pulumi.Bool(false),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.disableTcpStateTracking(true)
.enableAcceleratedNetworking(true)
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{nicConfig1-name}")
.primary(true)
.build(),
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.disableTcpStateTracking(false)
.enableAcceleratedNetworking(false)
.enableIPForwarding(false)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{nicConfig2-name}")
.primary(true)
.privateIPAddressVersion("IPv4")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}")
.build())
.build())
.name("{nicConfig2-name}")
.primary(false)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [
{
disableTcpStateTracking: true,
enableAcceleratedNetworking: true,
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{nicConfig1-name}",
primary: true,
},
{
disableTcpStateTracking: false,
enableAcceleratedNetworking: false,
enableIPForwarding: false,
ipConfigurations: [{
name: "{nicConfig2-name}",
primary: true,
privateIPAddressVersion: azure_native.compute.IPVersion.IPv4,
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
}],
name: "{nicConfig2-name}",
primary: false,
},
],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [
{
"disable_tcp_state_tracking": True,
"enable_accelerated_networking": True,
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{nicConfig1-name}",
"primary": True,
},
{
"disable_tcp_state_tracking": False,
"enable_accelerated_networking": False,
"enable_ip_forwarding": False,
"ip_configurations": [{
"name": "{nicConfig2-name}",
"primary": True,
"private_ip_address_version": azure_native.compute.IPVersion.I_PV4,
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
}],
"name": "{nicConfig2-name}",
"primary": False,
},
],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- disableTcpStateTracking: true
enableAcceleratedNetworking: true
enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{nicConfig1-name}'
primary: true
- disableTcpStateTracking: false
enableAcceleratedNetworking: false
enableIPForwarding: false
ipConfigurations:
- name: '{nicConfig2-name}'
primary: true
privateIPAddressVersion: IPv4
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}
name: '{nicConfig2-name}'
primary: false
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Application Profile
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
ApplicationProfile = new AzureNative.Compute.Inputs.ApplicationProfileArgs
{
GalleryApplications = new[]
{
new AzureNative.Compute.Inputs.VMGalleryApplicationArgs
{
ConfigurationReference = "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
EnableAutomaticUpgrade = false,
Order = 1,
PackageReferenceId = "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
Tags = "myTag1",
TreatFailureAsDeploymentFailure = true,
},
new AzureNative.Compute.Inputs.VMGalleryApplicationArgs
{
PackageReferenceId = "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
},
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
ApplicationProfile: &compute.ApplicationProfileArgs{
GalleryApplications: compute.VMGalleryApplicationArray{
&compute.VMGalleryApplicationArgs{
ConfigurationReference: pulumi.String("https://mystorageaccount.blob.core.windows.net/configurations/settings.config"),
EnableAutomaticUpgrade: pulumi.Bool(false),
Order: pulumi.Int(1),
PackageReferenceId: pulumi.String("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0"),
Tags: pulumi.String("myTag1"),
TreatFailureAsDeploymentFailure: pulumi.Bool(true),
},
&compute.VMGalleryApplicationArgs{
PackageReferenceId: pulumi.String("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1"),
},
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.ApplicationProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.applicationProfile(ApplicationProfileArgs.builder()
.galleryApplications(
VMGalleryApplicationArgs.builder()
.configurationReference("https://mystorageaccount.blob.core.windows.net/configurations/settings.config")
.enableAutomaticUpgrade(false)
.order(1)
.packageReferenceId("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0")
.tags("myTag1")
.treatFailureAsDeploymentFailure(true)
.build(),
VMGalleryApplicationArgs.builder()
.packageReferenceId("/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1")
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
applicationProfile: {
galleryApplications: [
{
configurationReference: "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
enableAutomaticUpgrade: false,
order: 1,
packageReferenceId: "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
tags: "myTag1",
treatFailureAsDeploymentFailure: true,
},
{
packageReferenceId: "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
},
],
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"application_profile": {
"gallery_applications": [
{
"configuration_reference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config",
"enable_automatic_upgrade": False,
"order": 1,
"package_reference_id": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0",
"tags": "myTag1",
"treat_failure_as_deployment_failure": True,
},
{
"package_reference_id": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1",
},
],
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
applicationProfile:
galleryApplications:
- configurationReference: https://mystorageaccount.blob.core.windows.net/configurations/settings.config
enableAutomaticUpgrade: false
order: 1
packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0
tags: myTag1
treatFailureAsDeploymentFailure: true
- packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Automatic Zone Rebalancing enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = false,
ResiliencyPolicy = new AzureNative.Compute.Inputs.ResiliencyPolicyArgs
{
AutomaticZoneRebalancingPolicy = new AzureNative.Compute.Inputs.AutomaticZoneRebalancingPolicyArgs
{
Enabled = true,
RebalanceBehavior = AzureNative.Compute.RebalanceBehavior.CreateBeforeDelete,
RebalanceStrategy = AzureNative.Compute.RebalanceStrategy.Recreate,
},
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(false),
ResiliencyPolicy: &compute.ResiliencyPolicyArgs{
AutomaticZoneRebalancingPolicy: &compute.AutomaticZoneRebalancingPolicyArgs{
Enabled: pulumi.Bool(true),
RebalanceBehavior: pulumi.String(compute.RebalanceBehaviorCreateBeforeDelete),
RebalanceStrategy: pulumi.String(compute.RebalanceStrategyRecreate),
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ResiliencyPolicyArgs;
import com.pulumi.azurenative.compute.inputs.AutomaticZoneRebalancingPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(false)
.resiliencyPolicy(ResiliencyPolicyArgs.builder()
.automaticZoneRebalancingPolicy(AutomaticZoneRebalancingPolicyArgs.builder()
.enabled(true)
.rebalanceBehavior("CreateBeforeDelete")
.rebalanceStrategy("Recreate")
.build())
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: false,
resiliencyPolicy: {
automaticZoneRebalancingPolicy: {
enabled: true,
rebalanceBehavior: azure_native.compute.RebalanceBehavior.CreateBeforeDelete,
rebalanceStrategy: azure_native.compute.RebalanceStrategy.Recreate,
},
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=False,
resiliency_policy={
"automatic_zone_rebalancing_policy": {
"enabled": True,
"rebalance_behavior": azure_native.compute.RebalanceBehavior.CREATE_BEFORE_DELETE,
"rebalance_strategy": azure_native.compute.RebalanceStrategy.RECREATE,
},
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: false
resiliencyPolicy:
automaticZoneRebalancingPolicy:
enabled: true
rebalanceBehavior: CreateBeforeDelete
rebalanceStrategy: Recreate
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Disk Controller Type
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
ScheduledEventsPolicy = new AzureNative.Compute.Inputs.ScheduledEventsPolicyArgs
{
ScheduledEventsAdditionalPublishingTargets = new AzureNative.Compute.Inputs.ScheduledEventsAdditionalPublishingTargetsArgs
{
EventGridAndResourceGraph = new AzureNative.Compute.Inputs.EventGridAndResourceGraphArgs
{
Enable = true,
},
},
UserInitiatedReboot = new AzureNative.Compute.Inputs.UserInitiatedRebootArgs
{
AutomaticallyApprove = true,
},
UserInitiatedRedeploy = new AzureNative.Compute.Inputs.UserInitiatedRedeployArgs
{
AutomaticallyApprove = true,
},
},
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
HardwareProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetHardwareProfileArgs
{
VmSizeProperties = new AzureNative.Compute.Inputs.VMSizePropertiesArgs
{
VCPUsAvailable = 1,
VCPUsPerCore = 1,
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
DiskControllerType = AzureNative.Compute.DiskControllerTypes.NVMe,
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
UserData = "RXhhbXBsZSBVc2VyRGF0YQ==",
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
ScheduledEventsPolicy: &compute.ScheduledEventsPolicyArgs{
ScheduledEventsAdditionalPublishingTargets: &compute.ScheduledEventsAdditionalPublishingTargetsArgs{
EventGridAndResourceGraph: &compute.EventGridAndResourceGraphArgs{
Enable: pulumi.Bool(true),
},
},
UserInitiatedReboot: &compute.UserInitiatedRebootArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
UserInitiatedRedeploy: &compute.UserInitiatedRedeployArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
},
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
HardwareProfile: &compute.VirtualMachineScaleSetHardwareProfileArgs{
VmSizeProperties: &compute.VMSizePropertiesArgs{
VCPUsAvailable: pulumi.Int(1),
VCPUsPerCore: pulumi.Int(1),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
DiskControllerType: pulumi.String(compute.DiskControllerTypesNVMe),
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
UserData: pulumi.String("RXhhbXBsZSBVc2VyRGF0YQ=="),
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsAdditionalPublishingTargetsArgs;
import com.pulumi.azurenative.compute.inputs.EventGridAndResourceGraphArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRebootArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRedeployArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetHardwareProfileArgs;
import com.pulumi.azurenative.compute.inputs.VMSizePropertiesArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.scheduledEventsPolicy(ScheduledEventsPolicyArgs.builder()
.scheduledEventsAdditionalPublishingTargets(ScheduledEventsAdditionalPublishingTargetsArgs.builder()
.eventGridAndResourceGraph(EventGridAndResourceGraphArgs.builder()
.enable(true)
.build())
.build())
.userInitiatedReboot(UserInitiatedRebootArgs.builder()
.automaticallyApprove(true)
.build())
.userInitiatedRedeploy(UserInitiatedRedeployArgs.builder()
.automaticallyApprove(true)
.build())
.build())
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.hardwareProfile(VirtualMachineScaleSetHardwareProfileArgs.builder()
.vmSizeProperties(VMSizePropertiesArgs.builder()
.vCPUsAvailable(1)
.vCPUsPerCore(1)
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.diskControllerType("NVMe")
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.userData("RXhhbXBsZSBVc2VyRGF0YQ==")
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
scheduledEventsPolicy: {
scheduledEventsAdditionalPublishingTargets: {
eventGridAndResourceGraph: {
enable: true,
},
},
userInitiatedReboot: {
automaticallyApprove: true,
},
userInitiatedRedeploy: {
automaticallyApprove: true,
},
},
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
hardwareProfile: {
vmSizeProperties: {
vCPUsAvailable: 1,
vCPUsPerCore: 1,
},
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
diskControllerType: azure_native.compute.DiskControllerTypes.NVMe,
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
userData: "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
scheduled_events_policy={
"scheduled_events_additional_publishing_targets": {
"event_grid_and_resource_graph": {
"enable": True,
},
},
"user_initiated_reboot": {
"automatically_approve": True,
},
"user_initiated_redeploy": {
"automatically_approve": True,
},
},
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"hardware_profile": {
"vm_size_properties": {
"v_cpus_available": 1,
"v_cpus_per_core": 1,
},
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"disk_controller_type": azure_native.compute.DiskControllerTypes.NV_ME,
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
"user_data": "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
scheduledEventsPolicy:
scheduledEventsAdditionalPublishingTargets:
eventGridAndResourceGraph:
enable: true
userInitiatedReboot:
automaticallyApprove: true
userInitiatedRedeploy:
automaticallyApprove: true
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
hardwareProfile:
vmSizeProperties:
vCPUsAvailable: 1
vCPUsPerCore: 1
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
diskControllerType: NVMe
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
userData: RXhhbXBsZSBVc2VyRGF0YQ==
vmScaleSetName: '{vmss-name}'
Create a scale set with DiskEncryptionSet resource in os disk and data disk.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,
DiskSizeGB = 1023,
Lun = 0,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
&compute.VirtualMachineScaleSetDataDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
DiskSizeGB: pulumi.Int(1023),
Lun: pulumi.Int(0),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
},
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
},
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.dataDisks(VirtualMachineScaleSetDataDiskArgs.builder()
.caching("ReadWrite")
.createOption("Empty")
.diskSizeGB(1023)
.lun(0)
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
.build())
.storageAccountType("Standard_LRS")
.build())
.build())
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
.build())
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
dataDisks: [{
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.Empty,
diskSizeGB: 1023,
lun: 0,
managedDisk: {
diskEncryptionSet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
}],
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
diskEncryptionSet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"data_disks": [{
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.EMPTY,
"disk_size_gb": 1023,
"lun": 0,
"managed_disk": {
"disk_encryption_set": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
}],
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"disk_encryption_set": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
dataDisks:
- caching: ReadWrite
createOption: Empty
diskSizeGB: 1023
lun: 0
managedDisk:
diskEncryptionSet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
storageAccountType: Standard_LRS
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
diskEncryptionSet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Fpga Network Interfaces.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableAcceleratedNetworking = false,
EnableFpga = true,
EnableIPForwarding = false,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{fpgaNic-Name}",
Primary = true,
PrivateIPAddressVersion = AzureNative.Compute.IPVersion.IPv4,
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
},
},
},
Name = "{fpgaNic-Name}",
Primary = false,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableAcceleratedNetworking: pulumi.Bool(false),
EnableFpga: pulumi.Bool(true),
EnableIPForwarding: pulumi.Bool(false),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{fpgaNic-Name}"),
Primary: pulumi.Bool(true),
PrivateIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}"),
},
},
},
Name: pulumi.String("{fpgaNic-Name}"),
Primary: pulumi.Bool(false),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build(),
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableAcceleratedNetworking(false)
.enableFpga(true)
.enableIPForwarding(false)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{fpgaNic-Name}")
.primary(true)
.privateIPAddressVersion("IPv4")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}")
.build())
.build())
.name("{fpgaNic-Name}")
.primary(false)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [
{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
},
{
enableAcceleratedNetworking: false,
enableFpga: true,
enableIPForwarding: false,
ipConfigurations: [{
name: "{fpgaNic-Name}",
primary: true,
privateIPAddressVersion: azure_native.compute.IPVersion.IPv4,
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
},
}],
name: "{fpgaNic-Name}",
primary: false,
},
],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [
{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
},
{
"enable_accelerated_networking": False,
"enable_fpga": True,
"enable_ip_forwarding": False,
"ip_configurations": [{
"name": "{fpgaNic-Name}",
"primary": True,
"private_ip_address_version": azure_native.compute.IPVersion.I_PV4,
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}",
},
}],
"name": "{fpgaNic-Name}",
"primary": False,
},
],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
- enableAcceleratedNetworking: false
enableFpga: true
enableIPForwarding: false
ipConfigurations:
- name: '{fpgaNic-Name}'
primary: true
privateIPAddressVersion: IPv4
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}
name: '{fpgaNic-Name}'
primary: false
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Host Encryption using encryptionAtHost property.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "windows2016",
Product = "windows-data-science-vm",
Publisher = "microsoft-ads",
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
EncryptionAtHost = true,
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windows-data-science-vm",
Publisher = "microsoft-ads",
Sku = "windows2016",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
Plan: &compute.PlanArgs{
Name: pulumi.String("windows2016"),
Product: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityProfile: &compute.SecurityProfileArgs{
EncryptionAtHost: pulumi.Bool(true),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
Sku: pulumi.String("windows2016"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.plan(PlanArgs.builder()
.name("windows2016")
.product("windows-data-science-vm")
.publisher("microsoft-ads")
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityProfile(SecurityProfileArgs.builder()
.encryptionAtHost(true)
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windows-data-science-vm")
.publisher("microsoft-ads")
.sku("windows2016")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
plan: {
name: "windows2016",
product: "windows-data-science-vm",
publisher: "microsoft-ads",
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityProfile: {
encryptionAtHost: true,
},
storageProfile: {
imageReference: {
offer: "windows-data-science-vm",
publisher: "microsoft-ads",
sku: "windows2016",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
plan={
"name": "windows2016",
"product": "windows-data-science-vm",
"publisher": "microsoft-ads",
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_profile": {
"encryption_at_host": True,
},
"storage_profile": {
"image_reference": {
"offer": "windows-data-science-vm",
"publisher": "microsoft-ads",
"sku": "windows2016",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
plan:
name: windows2016
product: windows-data-science-vm
publisher: microsoft-ads
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityProfile:
encryptionAtHost: true
storageProfile:
imageReference:
offer: windows-data-science-vm
publisher: microsoft-ads
sku: windows2016
version: latest
osDisk:
caching: ReadOnly
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Network Interfaces with public ip address dns settings.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
AuxiliaryMode = AzureNative.Compute.NetworkInterfaceAuxiliaryMode.AcceleratedConnections,
AuxiliarySku = AzureNative.Compute.NetworkInterfaceAuxiliarySku.A1,
DisableTcpStateTracking = true,
EnableAcceleratedNetworking = true,
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{nicConfig1-name}",
Primary = true,
},
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
DisableTcpStateTracking = false,
EnableAcceleratedNetworking = false,
EnableIPForwarding = false,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{nicConfig2-name}",
Primary = true,
PrivateIPAddressVersion = AzureNative.Compute.IPVersion.IPv4,
PublicIPAddressConfiguration = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationArgs
{
DnsSettings = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs
{
DomainNameLabel = "vmsstestlabel01",
DomainNameLabelScope = AzureNative.Compute.DomainNameLabelScopeTypes.NoReuse,
},
IdleTimeoutInMinutes = 10,
Name = "publicip",
},
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
},
},
Name = "{nicConfig2-name}",
Primary = false,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
AuxiliaryMode: pulumi.String(compute.NetworkInterfaceAuxiliaryModeAcceleratedConnections),
AuxiliarySku: pulumi.String(compute.NetworkInterfaceAuxiliarySkuA1),
DisableTcpStateTracking: pulumi.Bool(true),
EnableAcceleratedNetworking: pulumi.Bool(true),
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{nicConfig1-name}"),
Primary: pulumi.Bool(true),
},
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
DisableTcpStateTracking: pulumi.Bool(false),
EnableAcceleratedNetworking: pulumi.Bool(false),
EnableIPForwarding: pulumi.Bool(false),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{nicConfig2-name}"),
Primary: pulumi.Bool(true),
PrivateIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
PublicIPAddressConfiguration: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationArgs{
DnsSettings: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs{
DomainNameLabel: pulumi.String("vmsstestlabel01"),
DomainNameLabelScope: pulumi.String(compute.DomainNameLabelScopeTypesNoReuse),
},
IdleTimeoutInMinutes: pulumi.Int(10),
Name: pulumi.String("publicip"),
},
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}"),
},
},
},
Name: pulumi.String("{nicConfig2-name}"),
Primary: pulumi.Bool(false),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.auxiliaryMode("AcceleratedConnections")
.auxiliarySku("A1")
.disableTcpStateTracking(true)
.enableAcceleratedNetworking(true)
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{nicConfig1-name}")
.primary(true)
.build(),
VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.disableTcpStateTracking(false)
.enableAcceleratedNetworking(false)
.enableIPForwarding(false)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{nicConfig2-name}")
.primary(true)
.privateIPAddressVersion("IPv4")
.publicIPAddressConfiguration(VirtualMachineScaleSetPublicIPAddressConfigurationArgs.builder()
.dnsSettings(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs.builder()
.domainNameLabel("vmsstestlabel01")
.domainNameLabelScope("NoReuse")
.build())
.idleTimeoutInMinutes(10)
.name("publicip")
.build())
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}")
.build())
.build())
.name("{nicConfig2-name}")
.primary(false)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [
{
auxiliaryMode: azure_native.compute.NetworkInterfaceAuxiliaryMode.AcceleratedConnections,
auxiliarySku: azure_native.compute.NetworkInterfaceAuxiliarySku.A1,
disableTcpStateTracking: true,
enableAcceleratedNetworking: true,
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{nicConfig1-name}",
primary: true,
},
{
disableTcpStateTracking: false,
enableAcceleratedNetworking: false,
enableIPForwarding: false,
ipConfigurations: [{
name: "{nicConfig2-name}",
primary: true,
privateIPAddressVersion: azure_native.compute.IPVersion.IPv4,
publicIPAddressConfiguration: {
dnsSettings: {
domainNameLabel: "vmsstestlabel01",
domainNameLabelScope: azure_native.compute.DomainNameLabelScopeTypes.NoReuse,
},
idleTimeoutInMinutes: 10,
name: "publicip",
},
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
}],
name: "{nicConfig2-name}",
primary: false,
},
],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [
{
"auxiliary_mode": azure_native.compute.NetworkInterfaceAuxiliaryMode.ACCELERATED_CONNECTIONS,
"auxiliary_sku": azure_native.compute.NetworkInterfaceAuxiliarySku.A1,
"disable_tcp_state_tracking": True,
"enable_accelerated_networking": True,
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{nicConfig1-name}",
"primary": True,
},
{
"disable_tcp_state_tracking": False,
"enable_accelerated_networking": False,
"enable_ip_forwarding": False,
"ip_configurations": [{
"name": "{nicConfig2-name}",
"primary": True,
"private_ip_address_version": azure_native.compute.IPVersion.I_PV4,
"public_ip_address_configuration": {
"dns_settings": {
"domain_name_label": "vmsstestlabel01",
"domain_name_label_scope": azure_native.compute.DomainNameLabelScopeTypes.NO_REUSE,
},
"idle_timeout_in_minutes": 10,
"name": "publicip",
},
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}",
},
}],
"name": "{nicConfig2-name}",
"primary": False,
},
],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- auxiliaryMode: AcceleratedConnections
auxiliarySku: A1
disableTcpStateTracking: true
enableAcceleratedNetworking: true
enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{nicConfig1-name}'
primary: true
- disableTcpStateTracking: false
enableAcceleratedNetworking: false
enableIPForwarding: false
ipConfigurations:
- name: '{nicConfig2-name}'
primary: true
privateIPAddressVersion: IPv4
publicIPAddressConfiguration:
dnsSettings:
domainNameLabel: vmsstestlabel01
domainNameLabelScope: NoReuse
idleTimeoutInMinutes: 10
name: publicip
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}
name: '{nicConfig2-name}'
primary: false
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with OS image scheduled events enabled.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
ScheduledEventsProfile = new AzureNative.Compute.Inputs.ScheduledEventsProfileArgs
{
OsImageNotificationProfile = new AzureNative.Compute.Inputs.OSImageNotificationProfileArgs
{
Enable = true,
NotBeforeTimeout = "PT15M",
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
ScheduledEventsProfile: &compute.ScheduledEventsProfileArgs{
OsImageNotificationProfile: &compute.OSImageNotificationProfileArgs{
Enable: pulumi.Bool(true),
NotBeforeTimeout: pulumi.String("PT15M"),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsProfileArgs;
import com.pulumi.azurenative.compute.inputs.OSImageNotificationProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.scheduledEventsProfile(ScheduledEventsProfileArgs.builder()
.osImageNotificationProfile(OSImageNotificationProfileArgs.builder()
.enable(true)
.notBeforeTimeout("PT15M")
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
scheduledEventsProfile: {
osImageNotificationProfile: {
enable: true,
notBeforeTimeout: "PT15M",
},
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"scheduled_events_profile": {
"os_image_notification_profile": {
"enable": True,
"not_before_timeout": "PT15M",
},
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
scheduledEventsProfile:
osImageNotificationProfile:
enable: true
notBeforeTimeout: PT15M
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with ProxyAgent Settings of enabled and mode.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D2s_v3",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
ProxyAgentSettings = new AzureNative.Compute.Inputs.ProxyAgentSettingsArgs
{
Enabled = true,
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2019-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D2s_v3"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityProfile: &compute.SecurityProfileArgs{
ProxyAgentSettings: &compute.ProxyAgentSettingsArgs{
Enabled: pulumi.Bool(true),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2019-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.ProxyAgentSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D2s_v3")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityProfile(SecurityProfileArgs.builder()
.proxyAgentSettings(ProxyAgentSettingsArgs.builder()
.enabled(true)
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2019-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("StandardSSD_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D2s_v3",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityProfile: {
proxyAgentSettings: {
enabled: true,
},
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2019-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D2s_v3",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_profile": {
"proxy_agent_settings": {
"enabled": True,
},
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D2s_v3
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityProfile:
proxyAgentSettings:
enabled: true
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2019-Datacenter
version: latest
osDisk:
caching: ReadOnly
createOption: FromImage
managedDisk:
storageAccountType: StandardSSD_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Resilient VM Creation enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = false,
ResiliencyPolicy = new AzureNative.Compute.Inputs.ResiliencyPolicyArgs
{
ResilientVMCreationPolicy = new AzureNative.Compute.Inputs.ResilientVMCreationPolicyArgs
{
Enabled = true,
},
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(false),
ResiliencyPolicy: &compute.ResiliencyPolicyArgs{
ResilientVMCreationPolicy: &compute.ResilientVMCreationPolicyArgs{
Enabled: pulumi.Bool(true),
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ResiliencyPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ResilientVMCreationPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(false)
.resiliencyPolicy(ResiliencyPolicyArgs.builder()
.resilientVMCreationPolicy(ResilientVMCreationPolicyArgs.builder()
.enabled(true)
.build())
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: false,
resiliencyPolicy: {
resilientVMCreationPolicy: {
enabled: true,
},
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=False,
resiliency_policy={
"resilient_vm_creation_policy": {
"enabled": True,
},
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: false
resiliencyPolicy:
resilientVMCreationPolicy:
enabled: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Resilient VM Deletion enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = false,
ResiliencyPolicy = new AzureNative.Compute.Inputs.ResiliencyPolicyArgs
{
ResilientVMDeletionPolicy = new AzureNative.Compute.Inputs.ResilientVMDeletionPolicyArgs
{
Enabled = true,
},
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(false),
ResiliencyPolicy: &compute.ResiliencyPolicyArgs{
ResilientVMDeletionPolicy: &compute.ResilientVMDeletionPolicyArgs{
Enabled: pulumi.Bool(true),
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ResiliencyPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ResilientVMDeletionPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(false)
.resiliencyPolicy(ResiliencyPolicyArgs.builder()
.resilientVMDeletionPolicy(ResilientVMDeletionPolicyArgs.builder()
.enabled(true)
.build())
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: false,
resiliencyPolicy: {
resilientVMDeletionPolicy: {
enabled: true,
},
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=False,
resiliency_policy={
"resilient_vm_deletion_policy": {
"enabled": True,
},
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: false
resiliencyPolicy:
resilientVMDeletionPolicy:
enabled: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Security Posture Reference
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "eastus2euap",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_A1",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
AutomaticOSUpgradePolicy = new AzureNative.Compute.Inputs.AutomaticOSUpgradePolicyArgs
{
EnableAutomaticOSUpgrade = true,
},
Mode = AzureNative.Compute.UpgradeMode.Automatic,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityPostureReference = new AzureNative.Compute.Inputs.SecurityPostureReferenceArgs
{
Id = "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2022-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
Name = "osDisk",
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("eastus2euap"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_A1"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
AutomaticOSUpgradePolicy: &compute.AutomaticOSUpgradePolicyArgs{
EnableAutomaticOSUpgrade: pulumi.Bool(true),
},
Mode: compute.UpgradeModeAutomatic,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityPostureReference: &compute.SecurityPostureReferenceArgs{
Id: pulumi.String("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2022-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
Name: pulumi.String("osDisk"),
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.AutomaticOSUpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityPostureReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("eastus2euap")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_A1")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.automaticOSUpgradePolicy(AutomaticOSUpgradePolicyArgs.builder()
.enableAutomaticOSUpgrade(true)
.build())
.mode("Automatic")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityPostureReference(SecurityPostureReferenceArgs.builder()
.id("/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2022-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.name("osDisk")
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "eastus2euap",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_A1",
tier: "Standard",
},
upgradePolicy: {
automaticOSUpgradePolicy: {
enableAutomaticOSUpgrade: true,
},
mode: azure_native.compute.UpgradeMode.Automatic,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityPostureReference: {
id: "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2022-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
name: "osDisk",
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="eastus2euap",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_A1",
"tier": "Standard",
},
upgrade_policy={
"automatic_os_upgrade_policy": {
"enable_automatic_os_upgrade": True,
},
"mode": azure_native.compute.UpgradeMode.AUTOMATIC,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_posture_reference": {
"id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2022-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"name": "osDisk",
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: eastus2euap
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_A1
tier: Standard
upgradePolicy:
automaticOSUpgradePolicy:
enableAutomaticOSUpgrade: true
mode: Automatic
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityPostureReference:
id: /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2022-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
name: osDisk
vmScaleSetName: '{vmss-name}'
Create a scale set with SecurityType as ConfidentialVM
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DC2as_v5",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
SecurityType = AzureNative.Compute.SecurityTypes.ConfidentialVM,
UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs
{
SecureBootEnabled = true,
VTpmEnabled = true,
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "2019-datacenter-cvm",
Publisher = "MicrosoftWindowsServer",
Sku = "windows-cvm",
Version = "17763.2183.2109130127",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs
{
SecurityEncryptionType = AzureNative.Compute.SecurityEncryptionTypes.VMGuestStateOnly,
},
StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DC2as_v5"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityProfile: &compute.SecurityProfileArgs{
SecurityType: pulumi.String(compute.SecurityTypesConfidentialVM),
UefiSettings: &compute.UefiSettingsArgs{
SecureBootEnabled: pulumi.Bool(true),
VTpmEnabled: pulumi.Bool(true),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("2019-datacenter-cvm"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("windows-cvm"),
Version: pulumi.String("17763.2183.2109130127"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
SecurityProfile: &compute.VMDiskSecurityProfileArgs{
SecurityEncryptionType: pulumi.String(compute.SecurityEncryptionTypesVMGuestStateOnly),
},
StorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import com.pulumi.azurenative.compute.inputs.VMDiskSecurityProfileArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DC2as_v5")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityProfile(SecurityProfileArgs.builder()
.securityType("ConfidentialVM")
.uefiSettings(UefiSettingsArgs.builder()
.secureBootEnabled(true)
.vTpmEnabled(true)
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("2019-datacenter-cvm")
.publisher("MicrosoftWindowsServer")
.sku("windows-cvm")
.version("17763.2183.2109130127")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.securityProfile(VMDiskSecurityProfileArgs.builder()
.securityEncryptionType("VMGuestStateOnly")
.build())
.storageAccountType("StandardSSD_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DC2as_v5",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityProfile: {
securityType: azure_native.compute.SecurityTypes.ConfidentialVM,
uefiSettings: {
secureBootEnabled: true,
vTpmEnabled: true,
},
},
storageProfile: {
imageReference: {
offer: "2019-datacenter-cvm",
publisher: "MicrosoftWindowsServer",
sku: "windows-cvm",
version: "17763.2183.2109130127",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
securityProfile: {
securityEncryptionType: azure_native.compute.SecurityEncryptionTypes.VMGuestStateOnly,
},
storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DC2as_v5",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_profile": {
"security_type": azure_native.compute.SecurityTypes.CONFIDENTIAL_VM,
"uefi_settings": {
"secure_boot_enabled": True,
"v_tpm_enabled": True,
},
},
"storage_profile": {
"image_reference": {
"offer": "2019-datacenter-cvm",
"publisher": "MicrosoftWindowsServer",
"sku": "windows-cvm",
"version": "17763.2183.2109130127",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"security_profile": {
"security_encryption_type": azure_native.compute.SecurityEncryptionTypes.VM_GUEST_STATE_ONLY,
},
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DC2as_v5
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityProfile:
securityType: ConfidentialVM
uefiSettings:
secureBootEnabled: true
vTpmEnabled: true
storageProfile:
imageReference:
offer: 2019-datacenter-cvm
publisher: MicrosoftWindowsServer
sku: windows-cvm
version: 17763.2183.2109130127
osDisk:
caching: ReadOnly
createOption: FromImage
managedDisk:
securityProfile:
securityEncryptionType: VMGuestStateOnly
storageAccountType: StandardSSD_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with SecurityType as ConfidentialVM and NonPersistedTPM securityEncryptionType
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DC2es_v5",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
SecurityType = AzureNative.Compute.SecurityTypes.ConfidentialVM,
UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs
{
SecureBootEnabled = false,
VTpmEnabled = true,
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "2022-datacenter-cvm",
Publisher = "UbuntuServer",
Sku = "linux-cvm",
Version = "17763.2183.2109130127",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs
{
SecurityEncryptionType = AzureNative.Compute.SecurityEncryptionTypes.NonPersistedTPM,
},
StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DC2es_v5"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityProfile: &compute.SecurityProfileArgs{
SecurityType: pulumi.String(compute.SecurityTypesConfidentialVM),
UefiSettings: &compute.UefiSettingsArgs{
SecureBootEnabled: pulumi.Bool(false),
VTpmEnabled: pulumi.Bool(true),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("2022-datacenter-cvm"),
Publisher: pulumi.String("UbuntuServer"),
Sku: pulumi.String("linux-cvm"),
Version: pulumi.String("17763.2183.2109130127"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
SecurityProfile: &compute.VMDiskSecurityProfileArgs{
SecurityEncryptionType: pulumi.String(compute.SecurityEncryptionTypesNonPersistedTPM),
},
StorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import com.pulumi.azurenative.compute.inputs.VMDiskSecurityProfileArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DC2es_v5")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityProfile(SecurityProfileArgs.builder()
.securityType("ConfidentialVM")
.uefiSettings(UefiSettingsArgs.builder()
.secureBootEnabled(false)
.vTpmEnabled(true)
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("2022-datacenter-cvm")
.publisher("UbuntuServer")
.sku("linux-cvm")
.version("17763.2183.2109130127")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.securityProfile(VMDiskSecurityProfileArgs.builder()
.securityEncryptionType("NonPersistedTPM")
.build())
.storageAccountType("StandardSSD_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DC2es_v5",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityProfile: {
securityType: azure_native.compute.SecurityTypes.ConfidentialVM,
uefiSettings: {
secureBootEnabled: false,
vTpmEnabled: true,
},
},
storageProfile: {
imageReference: {
offer: "2022-datacenter-cvm",
publisher: "UbuntuServer",
sku: "linux-cvm",
version: "17763.2183.2109130127",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
securityProfile: {
securityEncryptionType: azure_native.compute.SecurityEncryptionTypes.NonPersistedTPM,
},
storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DC2es_v5",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_profile": {
"security_type": azure_native.compute.SecurityTypes.CONFIDENTIAL_VM,
"uefi_settings": {
"secure_boot_enabled": False,
"v_tpm_enabled": True,
},
},
"storage_profile": {
"image_reference": {
"offer": "2022-datacenter-cvm",
"publisher": "UbuntuServer",
"sku": "linux-cvm",
"version": "17763.2183.2109130127",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"security_profile": {
"security_encryption_type": azure_native.compute.SecurityEncryptionTypes.NON_PERSISTED_TPM,
},
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DC2es_v5
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityProfile:
securityType: ConfidentialVM
uefiSettings:
secureBootEnabled: false
vTpmEnabled: true
storageProfile:
imageReference:
offer: 2022-datacenter-cvm
publisher: UbuntuServer
sku: linux-cvm
version: 17763.2183.2109130127
osDisk:
caching: ReadOnly
createOption: FromImage
managedDisk:
securityProfile:
securityEncryptionType: NonPersistedTPM
storageAccountType: StandardSSD_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with Service Artifact Reference
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "eastus2euap",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_A1",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
AutomaticOSUpgradePolicy = new AzureNative.Compute.Inputs.AutomaticOSUpgradePolicyArgs
{
EnableAutomaticOSUpgrade = true,
},
Mode = AzureNative.Compute.UpgradeMode.Automatic,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
ServiceArtifactReference = new AzureNative.Compute.Inputs.ServiceArtifactReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2022-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
Name = "osDisk",
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("eastus2euap"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_A1"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
AutomaticOSUpgradePolicy: &compute.AutomaticOSUpgradePolicyArgs{
EnableAutomaticOSUpgrade: pulumi.Bool(true),
},
Mode: compute.UpgradeModeAutomatic,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
ServiceArtifactReference: &compute.ServiceArtifactReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2022-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
Name: pulumi.String("osDisk"),
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.AutomaticOSUpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.ServiceArtifactReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("eastus2euap")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_A1")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.automaticOSUpgradePolicy(AutomaticOSUpgradePolicyArgs.builder()
.enableAutomaticOSUpgrade(true)
.build())
.mode("Automatic")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.serviceArtifactReference(ServiceArtifactReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2022-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.name("osDisk")
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "eastus2euap",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_A1",
tier: "Standard",
},
upgradePolicy: {
automaticOSUpgradePolicy: {
enableAutomaticOSUpgrade: true,
},
mode: azure_native.compute.UpgradeMode.Automatic,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
serviceArtifactReference: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2022-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
name: "osDisk",
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="eastus2euap",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_A1",
"tier": "Standard",
},
upgrade_policy={
"automatic_os_upgrade_policy": {
"enable_automatic_os_upgrade": True,
},
"mode": azure_native.compute.UpgradeMode.AUTOMATIC,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"service_artifact_reference": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2022-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"name": "osDisk",
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: eastus2euap
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_A1
tier: Standard
upgradePolicy:
automaticOSUpgradePolicy:
enableAutomaticOSUpgrade: true
mode: Automatic
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
serviceArtifactReference:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2022-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
name: osDisk
vmScaleSetName: '{vmss-name}'
Create a scale set with Uefi Settings of secureBoot and vTPM.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D2s_v3",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
SecurityType = AzureNative.Compute.SecurityTypes.TrustedLaunch,
UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs
{
SecureBootEnabled = true,
VTpmEnabled = true,
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windowsserver-gen2preview-preview",
Publisher = "MicrosoftWindowsServer",
Sku = "windows10-tvm",
Version = "18363.592.2001092016",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D2s_v3"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
SecurityProfile: &compute.SecurityProfileArgs{
SecurityType: pulumi.String(compute.SecurityTypesTrustedLaunch),
UefiSettings: &compute.UefiSettingsArgs{
SecureBootEnabled: pulumi.Bool(true),
VTpmEnabled: pulumi.Bool(true),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windowsserver-gen2preview-preview"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("windows10-tvm"),
Version: pulumi.String("18363.592.2001092016"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D2s_v3")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.securityProfile(SecurityProfileArgs.builder()
.securityType("TrustedLaunch")
.uefiSettings(UefiSettingsArgs.builder()
.secureBootEnabled(true)
.vTpmEnabled(true)
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windowsserver-gen2preview-preview")
.publisher("MicrosoftWindowsServer")
.sku("windows10-tvm")
.version("18363.592.2001092016")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("StandardSSD_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D2s_v3",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
securityProfile: {
securityType: azure_native.compute.SecurityTypes.TrustedLaunch,
uefiSettings: {
secureBootEnabled: true,
vTpmEnabled: true,
},
},
storageProfile: {
imageReference: {
offer: "windowsserver-gen2preview-preview",
publisher: "MicrosoftWindowsServer",
sku: "windows10-tvm",
version: "18363.592.2001092016",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D2s_v3",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"security_profile": {
"security_type": azure_native.compute.SecurityTypes.TRUSTED_LAUNCH,
"uefi_settings": {
"secure_boot_enabled": True,
"v_tpm_enabled": True,
},
},
"storage_profile": {
"image_reference": {
"offer": "windowsserver-gen2preview-preview",
"publisher": "MicrosoftWindowsServer",
"sku": "windows10-tvm",
"version": "18363.592.2001092016",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D2s_v3
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
securityProfile:
securityType: TrustedLaunch
uefiSettings:
secureBootEnabled: true
vTpmEnabled: true
storageProfile:
imageReference:
offer: windowsserver-gen2preview-preview
publisher: MicrosoftWindowsServer
sku: windows10-tvm
version: 18363.592.2001092016
osDisk:
caching: ReadOnly
createOption: FromImage
managedDisk:
storageAccountType: StandardSSD_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with a marketplace image plan.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "windows2016",
Product = "windows-data-science-vm",
Publisher = "microsoft-ads",
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windows-data-science-vm",
Publisher = "microsoft-ads",
Sku = "windows2016",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
Plan: &compute.PlanArgs{
Name: pulumi.String("windows2016"),
Product: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
Sku: pulumi.String("windows2016"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.plan(PlanArgs.builder()
.name("windows2016")
.product("windows-data-science-vm")
.publisher("microsoft-ads")
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windows-data-science-vm")
.publisher("microsoft-ads")
.sku("windows2016")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
plan: {
name: "windows2016",
product: "windows-data-science-vm",
publisher: "microsoft-ads",
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "windows-data-science-vm",
publisher: "microsoft-ads",
sku: "windows2016",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
plan={
"name": "windows2016",
"product": "windows-data-science-vm",
"publisher": "microsoft-ads",
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "windows-data-science-vm",
"publisher": "microsoft-ads",
"sku": "windows2016",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
plan:
name: windows2016
product: windows-data-science-vm
publisher: microsoft-ads
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: windows-data-science-vm
publisher: microsoft-ads
sku: windows2016
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with an azure application gateway.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
ApplicationGatewayBackendAddressPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}",
},
},
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
ApplicationGatewayBackendAddressPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}"),
},
},
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.applicationGatewayBackendAddressPools(SubResourceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}")
.build())
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
applicationGatewayBackendAddressPools: [{
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}",
}],
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"application_gateway_backend_address_pools": [{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}",
}],
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- applicationGatewayBackendAddressPools:
- id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}
name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with an azure load balancer.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
LoadBalancerBackendAddressPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}",
},
},
LoadBalancerInboundNatPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}",
},
},
Name = "{vmss-name}",
PublicIPAddressConfiguration = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationArgs
{
Name = "{vmss-name}",
PublicIPAddressVersion = AzureNative.Compute.IPVersion.IPv4,
},
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
LoadBalancerBackendAddressPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}"),
},
},
LoadBalancerInboundNatPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}"),
},
},
Name: pulumi.String("{vmss-name}"),
PublicIPAddressConfiguration: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
PublicIPAddressVersion: pulumi.String(compute.IPVersionIPv4),
},
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.loadBalancerBackendAddressPools(SubResourceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}")
.build())
.loadBalancerInboundNatPools(SubResourceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}")
.build())
.name("{vmss-name}")
.publicIPAddressConfiguration(VirtualMachineScaleSetPublicIPAddressConfigurationArgs.builder()
.name("{vmss-name}")
.publicIPAddressVersion("IPv4")
.build())
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
loadBalancerBackendAddressPools: [{
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}",
}],
loadBalancerInboundNatPools: [{
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}",
}],
name: "{vmss-name}",
publicIPAddressConfiguration: {
name: "{vmss-name}",
publicIPAddressVersion: azure_native.compute.IPVersion.IPv4,
},
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"load_balancer_backend_address_pools": [{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}",
}],
"load_balancer_inbound_nat_pools": [{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}",
}],
"name": "{vmss-name}",
"public_ip_address_configuration": {
"name": "{vmss-name}",
"public_ip_address_version": azure_native.compute.IPVersion.I_PV4,
},
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- loadBalancerBackendAddressPools:
- id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}
loadBalancerInboundNatPools:
- id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}
name: '{vmss-name}'
publicIPAddressConfiguration:
name: '{vmss-name}'
publicIPAddressVersion: IPv4
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with automatic repairs enabled
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
AutomaticRepairsPolicy = new AzureNative.Compute.Inputs.AutomaticRepairsPolicyArgs
{
Enabled = true,
GracePeriod = "PT10M",
},
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
ScheduledEventsPolicy = new AzureNative.Compute.Inputs.ScheduledEventsPolicyArgs
{
ScheduledEventsAdditionalPublishingTargets = new AzureNative.Compute.Inputs.ScheduledEventsAdditionalPublishingTargetsArgs
{
EventGridAndResourceGraph = new AzureNative.Compute.Inputs.EventGridAndResourceGraphArgs
{
Enable = true,
},
},
UserInitiatedReboot = new AzureNative.Compute.Inputs.UserInitiatedRebootArgs
{
AutomaticallyApprove = true,
},
UserInitiatedRedeploy = new AzureNative.Compute.Inputs.UserInitiatedRedeployArgs
{
AutomaticallyApprove = true,
},
},
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
AutomaticRepairsPolicy: &compute.AutomaticRepairsPolicyArgs{
Enabled: pulumi.Bool(true),
GracePeriod: pulumi.String("PT10M"),
},
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
ScheduledEventsPolicy: &compute.ScheduledEventsPolicyArgs{
ScheduledEventsAdditionalPublishingTargets: &compute.ScheduledEventsAdditionalPublishingTargetsArgs{
EventGridAndResourceGraph: &compute.EventGridAndResourceGraphArgs{
Enable: pulumi.Bool(true),
},
},
UserInitiatedReboot: &compute.UserInitiatedRebootArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
UserInitiatedRedeploy: &compute.UserInitiatedRedeployArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
},
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.AutomaticRepairsPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsAdditionalPublishingTargetsArgs;
import com.pulumi.azurenative.compute.inputs.EventGridAndResourceGraphArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRebootArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRedeployArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.automaticRepairsPolicy(AutomaticRepairsPolicyArgs.builder()
.enabled(true)
.gracePeriod("PT10M")
.build())
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.scheduledEventsPolicy(ScheduledEventsPolicyArgs.builder()
.scheduledEventsAdditionalPublishingTargets(ScheduledEventsAdditionalPublishingTargetsArgs.builder()
.eventGridAndResourceGraph(EventGridAndResourceGraphArgs.builder()
.enable(true)
.build())
.build())
.userInitiatedReboot(UserInitiatedRebootArgs.builder()
.automaticallyApprove(true)
.build())
.userInitiatedRedeploy(UserInitiatedRedeployArgs.builder()
.automaticallyApprove(true)
.build())
.build())
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
automaticRepairsPolicy: {
enabled: true,
gracePeriod: "PT10M",
},
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
scheduledEventsPolicy: {
scheduledEventsAdditionalPublishingTargets: {
eventGridAndResourceGraph: {
enable: true,
},
},
userInitiatedReboot: {
automaticallyApprove: true,
},
userInitiatedRedeploy: {
automaticallyApprove: true,
},
},
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
automatic_repairs_policy={
"enabled": True,
"grace_period": "PT10M",
},
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
scheduled_events_policy={
"scheduled_events_additional_publishing_targets": {
"event_grid_and_resource_graph": {
"enable": True,
},
},
"user_initiated_reboot": {
"automatically_approve": True,
},
"user_initiated_redeploy": {
"automatically_approve": True,
},
},
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
automaticRepairsPolicy:
enabled: true
gracePeriod: PT10M
location: westus
overprovision: true
resourceGroupName: myResourceGroup
scheduledEventsPolicy:
scheduledEventsAdditionalPublishingTargets:
eventGridAndResourceGraph:
enable: true
userInitiatedReboot:
automaticallyApprove: true
userInitiatedRedeploy:
automaticallyApprove: true
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with boot diagnostics.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = true,
StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(true),
StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(true)
.storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
diagnosticsProfile: {
bootDiagnostics: {
enabled: true,
storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": True,
"storage_uri": "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
diagnosticsProfile:
bootDiagnostics:
enabled: true
storageUri: http://{existing-storage-account-name}.blob.core.windows.net
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with empty data disks on each vm.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D2_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,
DiskSizeGB = 1023,
Lun = 0,
},
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,
DiskSizeGB = 1023,
Lun = 1,
},
},
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
DiskSizeGB = 512,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D2_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
&compute.VirtualMachineScaleSetDataDiskArgs{
CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
DiskSizeGB: pulumi.Int(1023),
Lun: pulumi.Int(0),
},
&compute.VirtualMachineScaleSetDataDiskArgs{
CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
DiskSizeGB: pulumi.Int(1023),
Lun: pulumi.Int(1),
},
},
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
DiskSizeGB: pulumi.Int(512),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D2_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.dataDisks(
VirtualMachineScaleSetDataDiskArgs.builder()
.createOption("Empty")
.diskSizeGB(1023)
.lun(0)
.build(),
VirtualMachineScaleSetDataDiskArgs.builder()
.createOption("Empty")
.diskSizeGB(1023)
.lun(1)
.build())
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.diskSizeGB(512)
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D2_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
dataDisks: [
{
createOption: azure_native.compute.DiskCreateOptionTypes.Empty,
diskSizeGB: 1023,
lun: 0,
},
{
createOption: azure_native.compute.DiskCreateOptionTypes.Empty,
diskSizeGB: 1023,
lun: 1,
},
],
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
diskSizeGB: 512,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D2_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"data_disks": [
{
"create_option": azure_native.compute.DiskCreateOptionTypes.EMPTY,
"disk_size_gb": 1023,
"lun": 0,
},
{
"create_option": azure_native.compute.DiskCreateOptionTypes.EMPTY,
"disk_size_gb": 1023,
"lun": 1,
},
],
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"disk_size_gb": 512,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D2_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
dataDisks:
- createOption: Empty
diskSizeGB: 1023
lun: 0
- createOption: Empty
diskSizeGB: 1023
lun: 1
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
diskSizeGB: 512
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with ephemeral os disk provisioning in Nvme disk using placement property.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "windows2016",
Product = "windows-data-science-vm",
Publisher = "microsoft-ads",
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windows-data-science-vm",
Publisher = "microsoft-ads",
Sku = "windows2016",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs
{
Option = AzureNative.Compute.DiffDiskOptions.Local,
Placement = AzureNative.Compute.DiffDiskPlacement.NvmeDisk,
},
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
Plan: &compute.PlanArgs{
Name: pulumi.String("windows2016"),
Product: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
Sku: pulumi.String("windows2016"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
DiffDiskSettings: &compute.DiffDiskSettingsArgs{
Option: pulumi.String(compute.DiffDiskOptionsLocal),
Placement: pulumi.String(compute.DiffDiskPlacementNvmeDisk),
},
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.plan(PlanArgs.builder()
.name("windows2016")
.product("windows-data-science-vm")
.publisher("microsoft-ads")
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windows-data-science-vm")
.publisher("microsoft-ads")
.sku("windows2016")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.diffDiskSettings(DiffDiskSettingsArgs.builder()
.option("Local")
.placement("NvmeDisk")
.build())
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
plan: {
name: "windows2016",
product: "windows-data-science-vm",
publisher: "microsoft-ads",
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "windows-data-science-vm",
publisher: "microsoft-ads",
sku: "windows2016",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
diffDiskSettings: {
option: azure_native.compute.DiffDiskOptions.Local,
placement: azure_native.compute.DiffDiskPlacement.NvmeDisk,
},
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
plan={
"name": "windows2016",
"product": "windows-data-science-vm",
"publisher": "microsoft-ads",
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "windows-data-science-vm",
"publisher": "microsoft-ads",
"sku": "windows2016",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"diff_disk_settings": {
"option": azure_native.compute.DiffDiskOptions.LOCAL,
"placement": azure_native.compute.DiffDiskPlacement.NVME_DISK,
},
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
plan:
name: windows2016
product: windows-data-science-vm
publisher: microsoft-ads
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: windows-data-science-vm
publisher: microsoft-ads
sku: windows2016
version: latest
osDisk:
caching: ReadOnly
createOption: FromImage
diffDiskSettings:
option: Local
placement: NvmeDisk
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with ephemeral os disks using placement property.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "windows2016",
Product = "windows-data-science-vm",
Publisher = "microsoft-ads",
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windows-data-science-vm",
Publisher = "microsoft-ads",
Sku = "windows2016",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs
{
Option = AzureNative.Compute.DiffDiskOptions.Local,
Placement = AzureNative.Compute.DiffDiskPlacement.ResourceDisk,
},
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
Plan: &compute.PlanArgs{
Name: pulumi.String("windows2016"),
Product: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
Sku: pulumi.String("windows2016"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
DiffDiskSettings: &compute.DiffDiskSettingsArgs{
Option: pulumi.String(compute.DiffDiskOptionsLocal),
Placement: pulumi.String(compute.DiffDiskPlacementResourceDisk),
},
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.plan(PlanArgs.builder()
.name("windows2016")
.product("windows-data-science-vm")
.publisher("microsoft-ads")
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windows-data-science-vm")
.publisher("microsoft-ads")
.sku("windows2016")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.diffDiskSettings(DiffDiskSettingsArgs.builder()
.option("Local")
.placement("ResourceDisk")
.build())
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
plan: {
name: "windows2016",
product: "windows-data-science-vm",
publisher: "microsoft-ads",
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "windows-data-science-vm",
publisher: "microsoft-ads",
sku: "windows2016",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
diffDiskSettings: {
option: azure_native.compute.DiffDiskOptions.Local,
placement: azure_native.compute.DiffDiskPlacement.ResourceDisk,
},
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
plan={
"name": "windows2016",
"product": "windows-data-science-vm",
"publisher": "microsoft-ads",
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "windows-data-science-vm",
"publisher": "microsoft-ads",
"sku": "windows2016",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"diff_disk_settings": {
"option": azure_native.compute.DiffDiskOptions.LOCAL,
"placement": azure_native.compute.DiffDiskPlacement.RESOURCE_DISK,
},
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
plan:
name: windows2016
product: windows-data-science-vm
publisher: microsoft-ads
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: windows-data-science-vm
publisher: microsoft-ads
sku: windows2016
version: latest
osDisk:
caching: ReadOnly
createOption: FromImage
diffDiskSettings:
option: Local
placement: ResourceDisk
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with ephemeral os disks.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "windows2016",
Product = "windows-data-science-vm",
Publisher = "microsoft-ads",
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "windows-data-science-vm",
Publisher = "microsoft-ads",
Sku = "windows2016",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadOnly,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs
{
Option = AzureNative.Compute.DiffDiskOptions.Local,
},
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
Plan: &compute.PlanArgs{
Name: pulumi.String("windows2016"),
Product: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("windows-data-science-vm"),
Publisher: pulumi.String("microsoft-ads"),
Sku: pulumi.String("windows2016"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadOnly,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
DiffDiskSettings: &compute.DiffDiskSettingsArgs{
Option: pulumi.String(compute.DiffDiskOptionsLocal),
},
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PlanArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.plan(PlanArgs.builder()
.name("windows2016")
.product("windows-data-science-vm")
.publisher("microsoft-ads")
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("windows-data-science-vm")
.publisher("microsoft-ads")
.sku("windows2016")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadOnly")
.createOption("FromImage")
.diffDiskSettings(DiffDiskSettingsArgs.builder()
.option("Local")
.build())
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
plan: {
name: "windows2016",
product: "windows-data-science-vm",
publisher: "microsoft-ads",
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "windows-data-science-vm",
publisher: "microsoft-ads",
sku: "windows2016",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadOnly,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
diffDiskSettings: {
option: azure_native.compute.DiffDiskOptions.Local,
},
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
plan={
"name": "windows2016",
"product": "windows-data-science-vm",
"publisher": "microsoft-ads",
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "windows-data-science-vm",
"publisher": "microsoft-ads",
"sku": "windows2016",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_ONLY,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"diff_disk_settings": {
"option": azure_native.compute.DiffDiskOptions.LOCAL,
},
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
plan:
name: windows2016
product: windows-data-science-vm
publisher: microsoft-ads
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: windows-data-science-vm
publisher: microsoft-ads
sku: windows2016
version: latest
osDisk:
caching: ReadOnly
createOption: FromImage
diffDiskSettings:
option: Local
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with extension time budget.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = true,
StorageUri = "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
{
Extensions = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
{
AutoUpgradeMinorVersion = false,
Name = "{extension-name}",
Publisher = "{extension-Publisher}",
Settings = null,
Type = "{extension-Type}",
TypeHandlerVersion = "{handler-version}",
},
},
ExtensionsTimeBudget = "PT1H20M",
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(true),
StorageUri: pulumi.String("http://{existing-storage-account-name}.blob.core.windows.net"),
},
},
ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
&compute.VirtualMachineScaleSetExtensionTypeArgs{
AutoUpgradeMinorVersion: pulumi.Bool(false),
Name: pulumi.String("{extension-name}"),
Publisher: pulumi.String("{extension-Publisher}"),
Settings: pulumi.Any(map[string]interface{}{}),
Type: pulumi.String("{extension-Type}"),
TypeHandlerVersion: pulumi.String("{handler-version}"),
},
},
ExtensionsTimeBudget: pulumi.String("PT1H20M"),
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetExtensionProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(true)
.storageUri("http://{existing-storage-account-name}.blob.core.windows.net")
.build())
.build())
.extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
.extensions(VirtualMachineScaleSetExtensionArgs.builder()
.autoUpgradeMinorVersion(false)
.name("{extension-name}")
.publisher("{extension-Publisher}")
.settings(Map.ofEntries(
))
.type("{extension-Type}")
.typeHandlerVersion("{handler-version}")
.build())
.extensionsTimeBudget("PT1H20M")
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
diagnosticsProfile: {
bootDiagnostics: {
enabled: true,
storageUri: "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
extensionProfile: {
extensions: [{
autoUpgradeMinorVersion: false,
name: "{extension-name}",
publisher: "{extension-Publisher}",
settings: {},
type: "{extension-Type}",
typeHandlerVersion: "{handler-version}",
}],
extensionsTimeBudget: "PT1H20M",
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": True,
"storage_uri": "http://{existing-storage-account-name}.blob.core.windows.net",
},
},
"extension_profile": {
"extensions": [{
"auto_upgrade_minor_version": False,
"name": "{extension-name}",
"publisher": "{extension-Publisher}",
"settings": {},
"type": "{extension-Type}",
"type_handler_version": "{handler-version}",
}],
"extensions_time_budget": "PT1H20M",
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
diagnosticsProfile:
bootDiagnostics:
enabled: true
storageUri: http://{existing-storage-account-name}.blob.core.windows.net
extensionProfile:
extensions:
- autoUpgradeMinorVersion: false
name: '{extension-name}'
publisher: '{extension-Publisher}'
settings: {}
type: '{extension-Type}'
typeHandlerVersion: '{handler-version}'
extensionsTimeBudget: PT1H20M
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with managed boot diagnostics.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = true,
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(true),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;
import com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(true)
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
diagnosticsProfile: {
bootDiagnostics: {
enabled: true,
},
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": True,
},
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
diagnosticsProfile:
bootDiagnostics:
enabled: true
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with password authentication.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with premium storage.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Premium_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.PREMIUM_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Premium_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with priority mix policy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
OrchestrationMode = AzureNative.Compute.OrchestrationMode.Flexible,
PlatformFaultDomainCount = 1,
PriorityMixPolicy = new AzureNative.Compute.Inputs.PriorityMixPolicyArgs
{
BaseRegularPriorityCount = 10,
RegularPriorityPercentageAboveBase = 50,
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 2,
Name = "Standard_A8m_v2",
Tier = "Standard",
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkApiVersion = AzureNative.Compute.NetworkApiVersion.NetworkApiVersion_2020_11_01,
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableAcceleratedNetworking = false,
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
ApplicationGatewayBackendAddressPools = new() { },
LoadBalancerBackendAddressPools = new() { },
Name = "{vmss-name}",
Primary = true,
PublicIPAddressConfiguration = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationArgs
{
IdleTimeoutInMinutes = 15,
Name = "{vmss-name}",
},
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
Priority = AzureNative.Compute.VirtualMachinePriorityTypes.Spot,
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "0001-com-ubuntu-server-focal",
Publisher = "Canonical",
Sku = "20_04-lts-gen2",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
OrchestrationMode: pulumi.String(compute.OrchestrationModeFlexible),
PlatformFaultDomainCount: pulumi.Int(1),
PriorityMixPolicy: &compute.PriorityMixPolicyArgs{
BaseRegularPriorityCount: pulumi.Int(10),
RegularPriorityPercentageAboveBase: pulumi.Int(50),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(2),
Name: pulumi.String("Standard_A8m_v2"),
Tier: pulumi.String("Standard"),
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkApiVersion: pulumi.String(compute.NetworkApiVersion_2020_11_01),
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableAcceleratedNetworking: pulumi.Bool(false),
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
ApplicationGatewayBackendAddressPools: compute.SubResourceArray{},
LoadBalancerBackendAddressPools: compute.SubResourceArray{},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
PublicIPAddressConfiguration: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationArgs{
IdleTimeoutInMinutes: pulumi.Int(15),
Name: pulumi.String("{vmss-name}"),
},
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
Priority: pulumi.String(compute.VirtualMachinePriorityTypesSpot),
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("0001-com-ubuntu-server-focal"),
Publisher: pulumi.String("Canonical"),
Sku: pulumi.String("20_04-lts-gen2"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PriorityMixPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.orchestrationMode("Flexible")
.platformFaultDomainCount(1)
.priorityMixPolicy(PriorityMixPolicyArgs.builder()
.baseRegularPriorityCount(10)
.regularPriorityPercentageAboveBase(50)
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(2.0)
.name("Standard_A8m_v2")
.tier("Standard")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkApiVersion("2020-11-01")
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableAcceleratedNetworking(false)
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.applicationGatewayBackendAddressPools()
.loadBalancerBackendAddressPools()
.name("{vmss-name}")
.primary(true)
.publicIPAddressConfiguration(VirtualMachineScaleSetPublicIPAddressConfigurationArgs.builder()
.idleTimeoutInMinutes(15)
.name("{vmss-name}")
.build())
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.priority("Spot")
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("0001-com-ubuntu-server-focal")
.publisher("Canonical")
.sku("20_04-lts-gen2")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
orchestrationMode: azure_native.compute.OrchestrationMode.Flexible,
platformFaultDomainCount: 1,
priorityMixPolicy: {
baseRegularPriorityCount: 10,
regularPriorityPercentageAboveBase: 50,
},
resourceGroupName: "myResourceGroup",
sku: {
capacity: 2,
name: "Standard_A8m_v2",
tier: "Standard",
},
virtualMachineProfile: {
networkProfile: {
networkApiVersion: azure_native.compute.NetworkApiVersion.NetworkApiVersion_2020_11_01,
networkInterfaceConfigurations: [{
enableAcceleratedNetworking: false,
enableIPForwarding: true,
ipConfigurations: [{
applicationGatewayBackendAddressPools: [],
loadBalancerBackendAddressPools: [],
name: "{vmss-name}",
primary: true,
publicIPAddressConfiguration: {
idleTimeoutInMinutes: 15,
name: "{vmss-name}",
},
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
priority: azure_native.compute.VirtualMachinePriorityTypes.Spot,
storageProfile: {
imageReference: {
offer: "0001-com-ubuntu-server-focal",
publisher: "Canonical",
sku: "20_04-lts-gen2",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
orchestration_mode=azure_native.compute.OrchestrationMode.FLEXIBLE,
platform_fault_domain_count=1,
priority_mix_policy={
"base_regular_priority_count": 10,
"regular_priority_percentage_above_base": 50,
},
resource_group_name="myResourceGroup",
sku={
"capacity": float(2),
"name": "Standard_A8m_v2",
"tier": "Standard",
},
virtual_machine_profile={
"network_profile": {
"network_api_version": azure_native.compute.NetworkApiVersion.NETWORK_API_VERSION_2020_11_01,
"network_interface_configurations": [{
"enable_accelerated_networking": False,
"enable_ip_forwarding": True,
"ip_configurations": [{
"application_gateway_backend_address_pools": [],
"load_balancer_backend_address_pools": [],
"name": "{vmss-name}",
"primary": True,
"public_ip_address_configuration": {
"idle_timeout_in_minutes": 15,
"name": "{vmss-name}",
},
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"priority": azure_native.compute.VirtualMachinePriorityTypes.SPOT,
"storage_profile": {
"image_reference": {
"offer": "0001-com-ubuntu-server-focal",
"publisher": "Canonical",
"sku": "20_04-lts-gen2",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
orchestrationMode: Flexible
platformFaultDomainCount: 1
priorityMixPolicy:
baseRegularPriorityCount: 10
regularPriorityPercentageAboveBase: 50
resourceGroupName: myResourceGroup
sku:
capacity: 2
name: Standard_A8m_v2
tier: Standard
virtualMachineProfile:
networkProfile:
networkApiVersion: 2020-11-01
networkInterfaceConfigurations:
- enableAcceleratedNetworking: false
enableIPForwarding: true
ipConfigurations:
- applicationGatewayBackendAddressPools: []
loadBalancerBackendAddressPools: []
name: '{vmss-name}'
primary: true
publicIPAddressConfiguration:
idleTimeoutInMinutes: 15
name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
priority: Spot
storageProfile:
imageReference:
offer: 0001-com-ubuntu-server-focal
publisher: Canonical
sku: 20_04-lts-gen2
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with scaleInPolicy.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
ScaleInPolicy = new AzureNative.Compute.Inputs.ScaleInPolicyArgs
{
ForceDeletion = true,
PrioritizeUnhealthyVMs = true,
Rules = new[]
{
AzureNative.Compute.VirtualMachineScaleSetScaleInRules.OldestVM,
},
},
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
ScaleInPolicy: &compute.ScaleInPolicyArgs{
ForceDeletion: pulumi.Bool(true),
PrioritizeUnhealthyVMs: pulumi.Bool(true),
Rules: pulumi.StringArray{
pulumi.String(compute.VirtualMachineScaleSetScaleInRulesOldestVM),
},
},
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ScaleInPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.scaleInPolicy(ScaleInPolicyArgs.builder()
.forceDeletion(true)
.prioritizeUnhealthyVMs(true)
.rules("OldestVM")
.build())
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
scaleInPolicy: {
forceDeletion: true,
prioritizeUnhealthyVMs: true,
rules: [azure_native.compute.VirtualMachineScaleSetScaleInRules.OldestVM],
},
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
scale_in_policy={
"force_deletion": True,
"prioritize_unhealthy_vms": True,
"rules": [azure_native.compute.VirtualMachineScaleSetScaleInRules.OLDEST_VM],
},
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
scaleInPolicy:
forceDeletion: true
prioritizeUnhealthyVMs: true
rules:
- OldestVM
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with sku profile
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
OrchestrationMode = AzureNative.Compute.OrchestrationMode.Flexible,
PriorityMixPolicy = new AzureNative.Compute.Inputs.PriorityMixPolicyArgs
{
BaseRegularPriorityCount = 4,
RegularPriorityPercentageAboveBase = 50,
},
ResourceGroupName = "myResourceGroup",
SinglePlacementGroup = false,
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 10,
Name = "Mix",
},
SkuProfile = new AzureNative.Compute.Inputs.SkuProfileArgs
{
AllocationStrategy = AzureNative.Compute.AllocationStrategy.CapacityOptimized,
VmSizes = new[]
{
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_D8s_v5",
},
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_E16s_v5",
},
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_D2s_v5",
},
},
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
BillingProfile = new AzureNative.Compute.Inputs.BillingProfileArgs
{
MaxPrice = -1,
},
EvictionPolicy = AzureNative.Compute.VirtualMachineEvictionPolicyTypes.Deallocate,
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
Priority = AzureNative.Compute.VirtualMachinePriorityTypes.Spot,
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
OrchestrationMode: pulumi.String(compute.OrchestrationModeFlexible),
PriorityMixPolicy: &compute.PriorityMixPolicyArgs{
BaseRegularPriorityCount: pulumi.Int(4),
RegularPriorityPercentageAboveBase: pulumi.Int(50),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
SinglePlacementGroup: pulumi.Bool(false),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(10),
Name: pulumi.String("Mix"),
},
SkuProfile: &compute.SkuProfileArgs{
AllocationStrategy: pulumi.String(compute.AllocationStrategyCapacityOptimized),
VmSizes: compute.SkuProfileVMSizeArray{
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_D8s_v5"),
},
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_E16s_v5"),
},
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_D2s_v5"),
},
},
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
BillingProfile: &compute.BillingProfileArgs{
MaxPrice: pulumi.Float64(-1),
},
EvictionPolicy: pulumi.String(compute.VirtualMachineEvictionPolicyTypesDeallocate),
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
Priority: pulumi.String(compute.VirtualMachinePriorityTypesSpot),
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PriorityMixPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.SkuProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.BillingProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.orchestrationMode("Flexible")
.priorityMixPolicy(PriorityMixPolicyArgs.builder()
.baseRegularPriorityCount(4)
.regularPriorityPercentageAboveBase(50)
.build())
.resourceGroupName("myResourceGroup")
.singlePlacementGroup(false)
.sku(SkuArgs.builder()
.capacity(10.0)
.name("Mix")
.build())
.skuProfile(SkuProfileArgs.builder()
.allocationStrategy("CapacityOptimized")
.vmSizes(
SkuProfileVMSizeArgs.builder()
.name("Standard_D8s_v5")
.build(),
SkuProfileVMSizeArgs.builder()
.name("Standard_E16s_v5")
.build(),
SkuProfileVMSizeArgs.builder()
.name("Standard_D2s_v5")
.build())
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.billingProfile(BillingProfileArgs.builder()
.maxPrice(-1.0)
.build())
.evictionPolicy("Deallocate")
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.priority("Spot")
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
orchestrationMode: azure_native.compute.OrchestrationMode.Flexible,
priorityMixPolicy: {
baseRegularPriorityCount: 4,
regularPriorityPercentageAboveBase: 50,
},
resourceGroupName: "myResourceGroup",
singlePlacementGroup: false,
sku: {
capacity: 10,
name: "Mix",
},
skuProfile: {
allocationStrategy: azure_native.compute.AllocationStrategy.CapacityOptimized,
vmSizes: [
{
name: "Standard_D8s_v5",
},
{
name: "Standard_E16s_v5",
},
{
name: "Standard_D2s_v5",
},
],
},
virtualMachineProfile: {
billingProfile: {
maxPrice: -1,
},
evictionPolicy: azure_native.compute.VirtualMachineEvictionPolicyTypes.Deallocate,
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
priority: azure_native.compute.VirtualMachinePriorityTypes.Spot,
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
orchestration_mode=azure_native.compute.OrchestrationMode.FLEXIBLE,
priority_mix_policy={
"base_regular_priority_count": 4,
"regular_priority_percentage_above_base": 50,
},
resource_group_name="myResourceGroup",
single_placement_group=False,
sku={
"capacity": float(10),
"name": "Mix",
},
sku_profile={
"allocation_strategy": azure_native.compute.AllocationStrategy.CAPACITY_OPTIMIZED,
"vm_sizes": [
{
"name": "Standard_D8s_v5",
},
{
"name": "Standard_E16s_v5",
},
{
"name": "Standard_D2s_v5",
},
],
},
virtual_machine_profile={
"billing_profile": {
"max_price": float(-1),
},
"eviction_policy": azure_native.compute.VirtualMachineEvictionPolicyTypes.DEALLOCATE,
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"priority": azure_native.compute.VirtualMachinePriorityTypes.SPOT,
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
orchestrationMode: Flexible
priorityMixPolicy:
baseRegularPriorityCount: 4
regularPriorityPercentageAboveBase: 50
resourceGroupName: myResourceGroup
singlePlacementGroup: false
sku:
capacity: 10
name: Mix
skuProfile:
allocationStrategy: CapacityOptimized
vmSizes:
- name: Standard_D8s_v5
- name: Standard_E16s_v5
- name: Standard_D2s_v5
virtualMachineProfile:
billingProfile:
maxPrice: -1
evictionPolicy: Deallocate
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
priority: Spot
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with sku profile and prioritized allocation strategy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
OrchestrationMode = AzureNative.Compute.OrchestrationMode.Flexible,
PriorityMixPolicy = new AzureNative.Compute.Inputs.PriorityMixPolicyArgs
{
BaseRegularPriorityCount = 4,
RegularPriorityPercentageAboveBase = 50,
},
ResourceGroupName = "myResourceGroup",
SinglePlacementGroup = false,
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 10,
Name = "Mix",
},
SkuProfile = new AzureNative.Compute.Inputs.SkuProfileArgs
{
AllocationStrategy = AzureNative.Compute.AllocationStrategy.Prioritized,
VmSizes = new[]
{
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_D8s_v5",
Rank = 0,
},
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_E16s_v5",
Rank = 1,
},
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "Standard_D2s_v5",
Rank = 2,
},
},
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
BillingProfile = new AzureNative.Compute.Inputs.BillingProfileArgs
{
MaxPrice = -1,
},
EvictionPolicy = AzureNative.Compute.VirtualMachineEvictionPolicyTypes.Deallocate,
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
Priority = AzureNative.Compute.VirtualMachinePriorityTypes.Spot,
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
OrchestrationMode: pulumi.String(compute.OrchestrationModeFlexible),
PriorityMixPolicy: &compute.PriorityMixPolicyArgs{
BaseRegularPriorityCount: pulumi.Int(4),
RegularPriorityPercentageAboveBase: pulumi.Int(50),
},
ResourceGroupName: pulumi.String("myResourceGroup"),
SinglePlacementGroup: pulumi.Bool(false),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(10),
Name: pulumi.String("Mix"),
},
SkuProfile: &compute.SkuProfileArgs{
AllocationStrategy: pulumi.String(compute.AllocationStrategyPrioritized),
VmSizes: compute.SkuProfileVMSizeArray{
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_D8s_v5"),
Rank: pulumi.Int(0),
},
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_E16s_v5"),
Rank: pulumi.Int(1),
},
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("Standard_D2s_v5"),
Rank: pulumi.Int(2),
},
},
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
BillingProfile: &compute.BillingProfileArgs{
MaxPrice: pulumi.Float64(-1),
},
EvictionPolicy: pulumi.String(compute.VirtualMachineEvictionPolicyTypesDeallocate),
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
Priority: pulumi.String(compute.VirtualMachinePriorityTypesSpot),
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.PriorityMixPolicyArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.SkuProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.BillingProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.orchestrationMode("Flexible")
.priorityMixPolicy(PriorityMixPolicyArgs.builder()
.baseRegularPriorityCount(4)
.regularPriorityPercentageAboveBase(50)
.build())
.resourceGroupName("myResourceGroup")
.singlePlacementGroup(false)
.sku(SkuArgs.builder()
.capacity(10.0)
.name("Mix")
.build())
.skuProfile(SkuProfileArgs.builder()
.allocationStrategy("Prioritized")
.vmSizes(
SkuProfileVMSizeArgs.builder()
.name("Standard_D8s_v5")
.rank(0)
.build(),
SkuProfileVMSizeArgs.builder()
.name("Standard_E16s_v5")
.rank(1)
.build(),
SkuProfileVMSizeArgs.builder()
.name("Standard_D2s_v5")
.rank(2)
.build())
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.billingProfile(BillingProfileArgs.builder()
.maxPrice(-1.0)
.build())
.evictionPolicy("Deallocate")
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.priority("Spot")
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
orchestrationMode: azure_native.compute.OrchestrationMode.Flexible,
priorityMixPolicy: {
baseRegularPriorityCount: 4,
regularPriorityPercentageAboveBase: 50,
},
resourceGroupName: "myResourceGroup",
singlePlacementGroup: false,
sku: {
capacity: 10,
name: "Mix",
},
skuProfile: {
allocationStrategy: azure_native.compute.AllocationStrategy.Prioritized,
vmSizes: [
{
name: "Standard_D8s_v5",
rank: 0,
},
{
name: "Standard_E16s_v5",
rank: 1,
},
{
name: "Standard_D2s_v5",
rank: 2,
},
],
},
virtualMachineProfile: {
billingProfile: {
maxPrice: -1,
},
evictionPolicy: azure_native.compute.VirtualMachineEvictionPolicyTypes.Deallocate,
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
priority: azure_native.compute.VirtualMachinePriorityTypes.Spot,
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
orchestration_mode=azure_native.compute.OrchestrationMode.FLEXIBLE,
priority_mix_policy={
"base_regular_priority_count": 4,
"regular_priority_percentage_above_base": 50,
},
resource_group_name="myResourceGroup",
single_placement_group=False,
sku={
"capacity": float(10),
"name": "Mix",
},
sku_profile={
"allocation_strategy": azure_native.compute.AllocationStrategy.PRIORITIZED,
"vm_sizes": [
{
"name": "Standard_D8s_v5",
"rank": 0,
},
{
"name": "Standard_E16s_v5",
"rank": 1,
},
{
"name": "Standard_D2s_v5",
"rank": 2,
},
],
},
virtual_machine_profile={
"billing_profile": {
"max_price": float(-1),
},
"eviction_policy": azure_native.compute.VirtualMachineEvictionPolicyTypes.DEALLOCATE,
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"priority": azure_native.compute.VirtualMachinePriorityTypes.SPOT,
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
orchestrationMode: Flexible
priorityMixPolicy:
baseRegularPriorityCount: 4
regularPriorityPercentageAboveBase: 50
resourceGroupName: myResourceGroup
singlePlacementGroup: false
sku:
capacity: 10
name: Mix
skuProfile:
allocationStrategy: Prioritized
vmSizes:
- name: Standard_D8s_v5
rank: 0
- name: Standard_E16s_v5
rank: 1
- name: Standard_D2s_v5
rank: 2
virtualMachineProfile:
billingProfile:
maxPrice: -1
evictionPolicy: Deallocate
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
priority: Spot
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with spot restore policy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 2,
Name = "Standard_A8m_v2",
Tier = "Standard",
},
SpotRestorePolicy = new AzureNative.Compute.Inputs.SpotRestorePolicyArgs
{
Enabled = true,
RestoreTimeout = "PT1H",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
BillingProfile = new AzureNative.Compute.Inputs.BillingProfileArgs
{
MaxPrice = -1,
},
EvictionPolicy = AzureNative.Compute.VirtualMachineEvictionPolicyTypes.Deallocate,
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
Priority = AzureNative.Compute.VirtualMachinePriorityTypes.Spot,
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(2),
Name: pulumi.String("Standard_A8m_v2"),
Tier: pulumi.String("Standard"),
},
SpotRestorePolicy: &compute.SpotRestorePolicyArgs{
Enabled: pulumi.Bool(true),
RestoreTimeout: pulumi.String("PT1H"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
BillingProfile: &compute.BillingProfileArgs{
MaxPrice: pulumi.Float64(-1),
},
EvictionPolicy: pulumi.String(compute.VirtualMachineEvictionPolicyTypesDeallocate),
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
Priority: pulumi.String(compute.VirtualMachinePriorityTypesSpot),
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.SpotRestorePolicyArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.BillingProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(2.0)
.name("Standard_A8m_v2")
.tier("Standard")
.build())
.spotRestorePolicy(SpotRestorePolicyArgs.builder()
.enabled(true)
.restoreTimeout("PT1H")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.billingProfile(BillingProfileArgs.builder()
.maxPrice(-1.0)
.build())
.evictionPolicy("Deallocate")
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.priority("Spot")
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 2,
name: "Standard_A8m_v2",
tier: "Standard",
},
spotRestorePolicy: {
enabled: true,
restoreTimeout: "PT1H",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
billingProfile: {
maxPrice: -1,
},
evictionPolicy: azure_native.compute.VirtualMachineEvictionPolicyTypes.Deallocate,
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
priority: azure_native.compute.VirtualMachinePriorityTypes.Spot,
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(2),
"name": "Standard_A8m_v2",
"tier": "Standard",
},
spot_restore_policy={
"enabled": True,
"restore_timeout": "PT1H",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"billing_profile": {
"max_price": float(-1),
},
"eviction_policy": azure_native.compute.VirtualMachineEvictionPolicyTypes.DEALLOCATE,
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"priority": azure_native.compute.VirtualMachinePriorityTypes.SPOT,
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 2
name: Standard_A8m_v2
tier: Standard
spotRestorePolicy:
enabled: true
restoreTimeout: PT1H
upgradePolicy:
mode: Manual
virtualMachineProfile:
billingProfile:
maxPrice: -1
evictionPolicy: Deallocate
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
priority: Spot
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with ssh authentication.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs
{
DisablePasswordAuthentication = true,
Ssh = new AzureNative.Compute.Inputs.SshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.Compute.Inputs.SshPublicKeyArgs
{
KeyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1",
Path = "/home/{your-username}/.ssh/authorized_keys",
},
},
},
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
LinuxConfiguration: &compute.LinuxConfigurationArgs{
DisablePasswordAuthentication: pulumi.Bool(true),
Ssh: &compute.SshConfigurationArgs{
PublicKeys: compute.SshPublicKeyTypeArray{
&compute.SshPublicKeyTypeArgs{
KeyData: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1"),
Path: pulumi.String("/home/{your-username}/.ssh/authorized_keys"),
},
},
},
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;
import com.pulumi.azurenative.compute.inputs.SshConfigurationArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.linuxConfiguration(LinuxConfigurationArgs.builder()
.disablePasswordAuthentication(true)
.ssh(SshConfigurationArgs.builder()
.publicKeys(SshPublicKeyArgs.builder()
.keyData("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1")
.path("/home/{your-username}/.ssh/authorized_keys")
.build())
.build())
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
linuxConfiguration: {
disablePasswordAuthentication: true,
ssh: {
publicKeys: [{
keyData: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1",
path: "/home/{your-username}/.ssh/authorized_keys",
}],
},
},
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
"linux_configuration": {
"disable_password_authentication": True,
"ssh": {
"public_keys": [{
"key_data": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1",
"path": "/home/{your-username}/.ssh/authorized_keys",
}],
},
},
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
linuxConfiguration:
disablePasswordAuthentication: true
ssh:
publicKeys:
- keyData: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1
path: /home/{your-username}/.ssh/authorized_keys
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with terminate scheduled events enabled.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
ScheduledEventsProfile = new AzureNative.Compute.Inputs.ScheduledEventsProfileArgs
{
TerminateNotificationProfile = new AzureNative.Compute.Inputs.TerminateNotificationProfileArgs
{
Enable = true,
NotBeforeTimeout = "PT5M",
},
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
ScheduledEventsProfile: &compute.ScheduledEventsProfileArgs{
TerminateNotificationProfile: &compute.TerminateNotificationProfileArgs{
Enable: pulumi.Bool(true),
NotBeforeTimeout: pulumi.String("PT5M"),
},
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsProfileArgs;
import com.pulumi.azurenative.compute.inputs.TerminateNotificationProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.scheduledEventsProfile(ScheduledEventsProfileArgs.builder()
.terminateNotificationProfile(TerminateNotificationProfileArgs.builder()
.enable(true)
.notBeforeTimeout("PT5M")
.build())
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
scheduledEventsProfile: {
terminateNotificationProfile: {
enable: true,
notBeforeTimeout: "PT5M",
},
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"scheduled_events_profile": {
"terminate_notification_profile": {
"enable": True,
"not_before_timeout": "PT5M",
},
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
scheduledEventsProfile:
terminateNotificationProfile:
enable: true
notBeforeTimeout: PT5M
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create a scale set with userData.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
UserData = "RXhhbXBsZSBVc2VyRGF0YQ==",
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
UserData: pulumi.String("RXhhbXBsZSBVc2VyRGF0YQ=="),
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.userData("RXhhbXBsZSBVc2VyRGF0YQ==")
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
userData: "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
"user_data": "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
userData: RXhhbXBsZSBVc2VyRGF0YQ==
vmScaleSetName: '{vmss-name}'
Create a scale set with virtual machines in different zones.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "centralus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 2,
Name = "Standard_A1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Automatic,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,
DiskSizeGB = 1023,
Lun = 0,
},
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,
DiskSizeGB = 1023,
Lun = 1,
},
},
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
DiskSizeGB = 512,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
Zones = new[]
{
"1",
"3",
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("centralus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(2),
Name: pulumi.String("Standard_A1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeAutomatic,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
&compute.VirtualMachineScaleSetDataDiskArgs{
CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
DiskSizeGB: pulumi.Int(1023),
Lun: pulumi.Int(0),
},
&compute.VirtualMachineScaleSetDataDiskArgs{
CreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),
DiskSizeGB: pulumi.Int(1023),
Lun: pulumi.Int(1),
},
},
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
DiskSizeGB: pulumi.Int(512),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
Zones: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("3"),
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("centralus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(2.0)
.name("Standard_A1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Automatic")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.dataDisks(
VirtualMachineScaleSetDataDiskArgs.builder()
.createOption("Empty")
.diskSizeGB(1023)
.lun(0)
.build(),
VirtualMachineScaleSetDataDiskArgs.builder()
.createOption("Empty")
.diskSizeGB(1023)
.lun(1)
.build())
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.diskSizeGB(512)
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.zones(
"1",
"3")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "centralus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 2,
name: "Standard_A1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Automatic,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
dataDisks: [
{
createOption: azure_native.compute.DiskCreateOptionTypes.Empty,
diskSizeGB: 1023,
lun: 0,
},
{
createOption: azure_native.compute.DiskCreateOptionTypes.Empty,
diskSizeGB: 1023,
lun: 1,
},
],
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
diskSizeGB: 512,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
zones: [
"1",
"3",
],
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="centralus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(2),
"name": "Standard_A1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.AUTOMATIC,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"data_disks": [
{
"create_option": azure_native.compute.DiskCreateOptionTypes.EMPTY,
"disk_size_gb": 1023,
"lun": 0,
},
{
"create_option": azure_native.compute.DiskCreateOptionTypes.EMPTY,
"disk_size_gb": 1023,
"lun": 1,
},
],
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"disk_size_gb": 512,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}",
zones=[
"1",
"3",
])
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: centralus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 2
name: Standard_A1_v2
tier: Standard
upgradePolicy:
mode: Automatic
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
dataDisks:
- createOption: Empty
diskSizeGB: 1023
lun: 0
- createOption: Empty
diskSizeGB: 1023
lun: 1
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
diskSizeGB: 512
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
zones:
- '1'
- '3'
Create a scale set with vm size properties
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
HardwareProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetHardwareProfileArgs
{
VmSizeProperties = new AzureNative.Compute.Inputs.VMSizePropertiesArgs
{
VCPUsAvailable = 1,
VCPUsPerCore = 1,
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
UserData = "RXhhbXBsZSBVc2VyRGF0YQ==",
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
HardwareProfile: &compute.VirtualMachineScaleSetHardwareProfileArgs{
VmSizeProperties: &compute.VMSizePropertiesArgs{
VCPUsAvailable: pulumi.Int(1),
VCPUsPerCore: pulumi.Int(1),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
UserData: pulumi.String("RXhhbXBsZSBVc2VyRGF0YQ=="),
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetHardwareProfileArgs;
import com.pulumi.azurenative.compute.inputs.VMSizePropertiesArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.hardwareProfile(VirtualMachineScaleSetHardwareProfileArgs.builder()
.vmSizeProperties(VMSizePropertiesArgs.builder()
.vCPUsAvailable(1)
.vCPUsPerCore(1)
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.userData("RXhhbXBsZSBVc2VyRGF0YQ==")
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
hardwareProfile: {
vmSizeProperties: {
vCPUsAvailable: 1,
vCPUsPerCore: 1,
},
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
userData: "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"hardware_profile": {
"vm_size_properties": {
"v_cpus_available": 1,
"v_cpus_per_core": 1,
},
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
"user_data": "RXhhbXBsZSBVc2VyRGF0YQ==",
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
hardwareProfile:
vmSizeProperties:
vCPUsAvailable: 1
vCPUsPerCore: 1
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
userData: RXhhbXBsZSBVc2VyRGF0YQ==
vmScaleSetName: '{vmss-name}'
Create a scale set with zonalPlatformFaultDomainAlignMode as Aligned
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
ScheduledEventsPolicy = new AzureNative.Compute.Inputs.ScheduledEventsPolicyArgs
{
ScheduledEventsAdditionalPublishingTargets = new AzureNative.Compute.Inputs.ScheduledEventsAdditionalPublishingTargetsArgs
{
EventGridAndResourceGraph = new AzureNative.Compute.Inputs.EventGridAndResourceGraphArgs
{
Enable = true,
},
},
UserInitiatedReboot = new AzureNative.Compute.Inputs.UserInitiatedRebootArgs
{
AutomaticallyApprove = true,
},
UserInitiatedRedeploy = new AzureNative.Compute.Inputs.UserInitiatedRedeployArgs
{
AutomaticallyApprove = true,
},
},
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_D1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
ZonalPlatformFaultDomainAlignMode = AzureNative.Compute.ZonalPlatformFaultDomainAlignMode.Aligned,
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
ScheduledEventsPolicy: &compute.ScheduledEventsPolicyArgs{
ScheduledEventsAdditionalPublishingTargets: &compute.ScheduledEventsAdditionalPublishingTargetsArgs{
EventGridAndResourceGraph: &compute.EventGridAndResourceGraphArgs{
Enable: pulumi.Bool(true),
},
},
UserInitiatedReboot: &compute.UserInitiatedRebootArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
UserInitiatedRedeploy: &compute.UserInitiatedRedeployArgs{
AutomaticallyApprove: pulumi.Bool(true),
},
},
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_D1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
ZonalPlatformFaultDomainAlignMode: pulumi.String(compute.ZonalPlatformFaultDomainAlignModeAligned),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsPolicyArgs;
import com.pulumi.azurenative.compute.inputs.ScheduledEventsAdditionalPublishingTargetsArgs;
import com.pulumi.azurenative.compute.inputs.EventGridAndResourceGraphArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRebootArgs;
import com.pulumi.azurenative.compute.inputs.UserInitiatedRedeployArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.scheduledEventsPolicy(ScheduledEventsPolicyArgs.builder()
.scheduledEventsAdditionalPublishingTargets(ScheduledEventsAdditionalPublishingTargetsArgs.builder()
.eventGridAndResourceGraph(EventGridAndResourceGraphArgs.builder()
.enable(true)
.build())
.build())
.userInitiatedReboot(UserInitiatedRebootArgs.builder()
.automaticallyApprove(true)
.build())
.userInitiatedRedeploy(UserInitiatedRedeployArgs.builder()
.automaticallyApprove(true)
.build())
.build())
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_D1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.zonalPlatformFaultDomainAlignMode("Aligned")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
scheduledEventsPolicy: {
scheduledEventsAdditionalPublishingTargets: {
eventGridAndResourceGraph: {
enable: true,
},
},
userInitiatedReboot: {
automaticallyApprove: true,
},
userInitiatedRedeploy: {
automaticallyApprove: true,
},
},
sku: {
capacity: 3,
name: "Standard_D1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
zonalPlatformFaultDomainAlignMode: azure_native.compute.ZonalPlatformFaultDomainAlignMode.Aligned,
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
scheduled_events_policy={
"scheduled_events_additional_publishing_targets": {
"event_grid_and_resource_graph": {
"enable": True,
},
},
"user_initiated_reboot": {
"automatically_approve": True,
},
"user_initiated_redeploy": {
"automatically_approve": True,
},
},
sku={
"capacity": float(3),
"name": "Standard_D1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}",
zonal_platform_fault_domain_align_mode=azure_native.compute.ZonalPlatformFaultDomainAlignMode.ALIGNED)
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
scheduledEventsPolicy:
scheduledEventsAdditionalPublishingTargets:
eventGridAndResourceGraph:
enable: true
userInitiatedReboot:
automaticallyApprove: true
userInitiatedRedeploy:
automaticallyApprove: true
sku:
capacity: 3
name: Standard_D1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
zonalPlatformFaultDomainAlignMode: Aligned
Create or update a scale set with capacity reservation.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachineScaleSet = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSet", new()
{
Location = "westus",
Overprovision = true,
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 3,
Name = "Standard_DS1_v2",
Tier = "Standard",
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
Mode = AzureNative.Compute.UpgradeMode.Manual,
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
CapacityReservation = new AzureNative.Compute.Inputs.CapacityReservationProfileArgs
{
CapacityReservationGroup = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}",
},
},
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
EnableIPForwarding = true,
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "{vmss-name}",
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
},
},
Name = "{vmss-name}",
Primary = true,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "{your-password}",
AdminUsername = "{your-username}",
ComputerNamePrefix = "{vmss-name}",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "MicrosoftWindowsServer",
Sku = "2016-Datacenter",
Version = "latest",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
Caching = AzureNative.Compute.CachingTypes.ReadWrite,
CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
VmScaleSetName = "{vmss-name}",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSet", &compute.VirtualMachineScaleSetArgs{
Location: pulumi.String("westus"),
Overprovision: pulumi.Bool(true),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(3),
Name: pulumi.String("Standard_DS1_v2"),
Tier: pulumi.String("Standard"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
Mode: compute.UpgradeModeManual,
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
CapacityReservation: &compute.CapacityReservationProfileArgs{
CapacityReservationGroup: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}"),
},
},
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
EnableIPForwarding: pulumi.Bool(true),
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("{vmss-name}"),
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"),
},
},
},
Name: pulumi.String("{vmss-name}"),
Primary: pulumi.Bool(true),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("{your-password}"),
AdminUsername: pulumi.String("{your-username}"),
ComputerNamePrefix: pulumi.String("{vmss-name}"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
ImageReference: &compute.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("MicrosoftWindowsServer"),
Sku: pulumi.String("2016-Datacenter"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
Caching: compute.CachingTypesReadWrite,
CreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
StorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),
},
},
},
},
VmScaleSetName: pulumi.String("{vmss-name}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.VirtualMachineScaleSet;
import com.pulumi.azurenative.compute.VirtualMachineScaleSetArgs;
import com.pulumi.azurenative.compute.inputs.SkuArgs;
import com.pulumi.azurenative.compute.inputs.UpgradePolicyArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetVMProfileArgs;
import com.pulumi.azurenative.compute.inputs.CapacityReservationProfileArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetNetworkProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSProfileArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var virtualMachineScaleSet = new VirtualMachineScaleSet("virtualMachineScaleSet", VirtualMachineScaleSetArgs.builder()
.location("westus")
.overprovision(true)
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.capacity(3.0)
.name("Standard_DS1_v2")
.tier("Standard")
.build())
.upgradePolicy(UpgradePolicyArgs.builder()
.mode("Manual")
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.capacityReservation(CapacityReservationProfileArgs.builder()
.capacityReservationGroup(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}")
.build())
.build())
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.enableIPForwarding(true)
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("{vmss-name}")
.subnet(ApiEntityReferenceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}")
.build())
.build())
.name("{vmss-name}")
.primary(true)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("{your-password}")
.adminUsername("{your-username}")
.computerNamePrefix("{vmss-name}")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2016-Datacenter")
.version("latest")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.caching("ReadWrite")
.createOption("FromImage")
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.storageAccountType("Standard_LRS")
.build())
.build())
.build())
.build())
.vmScaleSetName("{vmss-name}")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const virtualMachineScaleSet = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet", {
location: "westus",
overprovision: true,
resourceGroupName: "myResourceGroup",
sku: {
capacity: 3,
name: "Standard_DS1_v2",
tier: "Standard",
},
upgradePolicy: {
mode: azure_native.compute.UpgradeMode.Manual,
},
virtualMachineProfile: {
capacityReservation: {
capacityReservationGroup: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}",
},
},
networkProfile: {
networkInterfaceConfigurations: [{
enableIPForwarding: true,
ipConfigurations: [{
name: "{vmss-name}",
subnet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
name: "{vmss-name}",
primary: true,
}],
},
osProfile: {
adminPassword: "{your-password}",
adminUsername: "{your-username}",
computerNamePrefix: "{vmss-name}",
},
storageProfile: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter",
version: "latest",
},
osDisk: {
caching: azure_native.compute.CachingTypes.ReadWrite,
createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,
managedDisk: {
storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,
},
},
},
},
vmScaleSetName: "{vmss-name}",
});
import pulumi
import pulumi_azure_native as azure_native
virtual_machine_scale_set = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSet",
location="westus",
overprovision=True,
resource_group_name="myResourceGroup",
sku={
"capacity": float(3),
"name": "Standard_DS1_v2",
"tier": "Standard",
},
upgrade_policy={
"mode": azure_native.compute.UpgradeMode.MANUAL,
},
virtual_machine_profile={
"capacity_reservation": {
"capacity_reservation_group": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}",
},
},
"network_profile": {
"network_interface_configurations": [{
"enable_ip_forwarding": True,
"ip_configurations": [{
"name": "{vmss-name}",
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}",
},
}],
"name": "{vmss-name}",
"primary": True,
}],
},
"os_profile": {
"admin_password": "{your-password}",
"admin_username": "{your-username}",
"computer_name_prefix": "{vmss-name}",
},
"storage_profile": {
"image_reference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"version": "latest",
},
"os_disk": {
"caching": azure_native.compute.CachingTypes.READ_WRITE,
"create_option": azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,
"managed_disk": {
"storage_account_type": azure_native.compute.StorageAccountTypes.STANDARD_LRS,
},
},
},
},
vm_scale_set_name="{vmss-name}")
resources:
virtualMachineScaleSet:
type: azure-native:compute:VirtualMachineScaleSet
properties:
location: westus
overprovision: true
resourceGroupName: myResourceGroup
sku:
capacity: 3
name: Standard_DS1_v2
tier: Standard
upgradePolicy:
mode: Manual
virtualMachineProfile:
capacityReservation:
capacityReservationGroup:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}
networkProfile:
networkInterfaceConfigurations:
- enableIPForwarding: true
ipConfigurations:
- name: '{vmss-name}'
subnet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}
name: '{vmss-name}'
primary: true
osProfile:
adminPassword: '{your-password}'
adminUsername: '{your-username}'
computerNamePrefix: '{vmss-name}'
storageProfile:
imageReference:
offer: WindowsServer
publisher: MicrosoftWindowsServer
sku: 2016-Datacenter
version: latest
osDisk:
caching: ReadWrite
createOption: FromImage
managedDisk:
storageAccountType: Standard_LRS
vmScaleSetName: '{vmss-name}'
Create VirtualMachineScaleSet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualMachineScaleSet(name: string, args: VirtualMachineScaleSetArgs, opts?: CustomResourceOptions);@overload
def VirtualMachineScaleSet(resource_name: str,
args: VirtualMachineScaleSetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualMachineScaleSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
resiliency_policy: Optional[ResiliencyPolicyArgs] = None,
virtual_machine_profile: Optional[VirtualMachineScaleSetVMProfileArgs] = None,
do_not_run_extensions_on_overprovisioned_vms: Optional[bool] = None,
extended_location: Optional[ExtendedLocationArgs] = None,
automatic_repairs_policy: Optional[AutomaticRepairsPolicyArgs] = None,
identity: Optional[VirtualMachineScaleSetIdentityArgs] = None,
location: Optional[str] = None,
orchestration_mode: Optional[Union[str, OrchestrationMode]] = None,
overprovision: Optional[bool] = None,
plan: Optional[PlanArgs] = None,
platform_fault_domain_count: Optional[int] = None,
priority_mix_policy: Optional[PriorityMixPolicyArgs] = None,
constrained_maximum_capacity: Optional[bool] = None,
proximity_placement_group: Optional[SubResourceArgs] = None,
host_group: Optional[SubResourceArgs] = None,
scale_in_policy: Optional[ScaleInPolicyArgs] = None,
scheduled_events_policy: Optional[ScheduledEventsPolicyArgs] = None,
single_placement_group: Optional[bool] = None,
sku: Optional[SkuArgs] = None,
sku_profile: Optional[SkuProfileArgs] = None,
spot_restore_policy: Optional[SpotRestorePolicyArgs] = None,
tags: Optional[Mapping[str, str]] = None,
upgrade_policy: Optional[UpgradePolicyArgs] = None,
additional_capabilities: Optional[AdditionalCapabilitiesArgs] = None,
vm_scale_set_name: Optional[str] = None,
zonal_platform_fault_domain_align_mode: Optional[Union[str, ZonalPlatformFaultDomainAlignMode]] = None,
zone_balance: Optional[bool] = None,
zones: Optional[Sequence[str]] = None)func NewVirtualMachineScaleSet(ctx *Context, name string, args VirtualMachineScaleSetArgs, opts ...ResourceOption) (*VirtualMachineScaleSet, error)public VirtualMachineScaleSet(string name, VirtualMachineScaleSetArgs args, CustomResourceOptions? opts = null)
public VirtualMachineScaleSet(String name, VirtualMachineScaleSetArgs args)
public VirtualMachineScaleSet(String name, VirtualMachineScaleSetArgs args, CustomResourceOptions options)
type: azure-native:compute:VirtualMachineScaleSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_compute_virtualmachinescaleset" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VirtualMachineScaleSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VirtualMachineScaleSetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VirtualMachineScaleSetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualMachineScaleSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualMachineScaleSetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var virtualMachineScaleSetResource = new AzureNative.Compute.VirtualMachineScaleSet("virtualMachineScaleSetResource", new()
{
ResourceGroupName = "string",
ResiliencyPolicy = new AzureNative.Compute.Inputs.ResiliencyPolicyArgs
{
AutomaticZoneRebalancingPolicy = new AzureNative.Compute.Inputs.AutomaticZoneRebalancingPolicyArgs
{
Enabled = false,
RebalanceBehavior = "string",
RebalanceStrategy = "string",
},
ResilientVMCreationPolicy = new AzureNative.Compute.Inputs.ResilientVMCreationPolicyArgs
{
Enabled = false,
},
ResilientVMDeletionPolicy = new AzureNative.Compute.Inputs.ResilientVMDeletionPolicyArgs
{
Enabled = false,
},
},
VirtualMachineProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetVMProfileArgs
{
ApplicationProfile = new AzureNative.Compute.Inputs.ApplicationProfileArgs
{
GalleryApplications = new[]
{
new AzureNative.Compute.Inputs.VMGalleryApplicationArgs
{
PackageReferenceId = "string",
ConfigurationReference = "string",
EnableAutomaticUpgrade = false,
Order = 0,
Tags = "string",
TreatFailureAsDeploymentFailure = false,
},
},
},
BillingProfile = new AzureNative.Compute.Inputs.BillingProfileArgs
{
MaxPrice = 0,
},
CapacityReservation = new AzureNative.Compute.Inputs.CapacityReservationProfileArgs
{
CapacityReservationGroup = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs
{
BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs
{
Enabled = false,
StorageUri = "string",
},
},
EvictionPolicy = "string",
ExtensionProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionProfileArgs
{
Extensions = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetExtensionArgs
{
AutoUpgradeMinorVersion = false,
EnableAutomaticUpgrade = false,
ForceUpdateTag = "string",
Name = "string",
ProtectedSettings = "any",
ProtectedSettingsFromKeyVault = new AzureNative.Compute.Inputs.KeyVaultSecretReferenceArgs
{
SecretUrl = "string",
SourceVault = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
ProvisionAfterExtensions = new[]
{
"string",
},
Publisher = "string",
Settings = "any",
SuppressFailures = false,
Type = "string",
TypeHandlerVersion = "string",
},
},
ExtensionsTimeBudget = "string",
},
HardwareProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetHardwareProfileArgs
{
VmSizeProperties = new AzureNative.Compute.Inputs.VMSizePropertiesArgs
{
VCPUsAvailable = 0,
VCPUsPerCore = 0,
},
},
LicenseType = "string",
NetworkProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkProfileArgs
{
HealthProbe = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "string",
},
NetworkApiVersion = "string",
NetworkInterfaceConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
{
IpConfigurations = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIPConfigurationArgs
{
Name = "string",
ApplicationGatewayBackendAddressPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
ApplicationSecurityGroups = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
LoadBalancerBackendAddressPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
LoadBalancerInboundNatPools = new[]
{
new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
},
Primary = false,
PrivateIPAddressVersion = "string",
PublicIPAddressConfiguration = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationArgs
{
Name = "string",
DeleteOption = "string",
DnsSettings = new AzureNative.Compute.Inputs.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs
{
DomainNameLabel = "string",
DomainNameLabelScope = "string",
},
IdleTimeoutInMinutes = 0,
IpTags = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetIpTagArgs
{
IpTagType = "string",
Tag = "string",
},
},
PublicIPAddressVersion = "string",
PublicIPPrefix = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
Sku = new AzureNative.Compute.Inputs.PublicIPAddressSkuArgs
{
Name = "string",
Tier = "string",
},
},
Subnet = new AzureNative.Compute.Inputs.ApiEntityReferenceArgs
{
Id = "string",
},
},
},
Name = "string",
AuxiliaryMode = "string",
AuxiliarySku = "string",
DeleteOption = "string",
DisableTcpStateTracking = false,
DnsSettings = new AzureNative.Compute.Inputs.VirtualMachineScaleSetNetworkConfigurationDnsSettingsArgs
{
DnsServers = new[]
{
"string",
},
},
EnableAcceleratedNetworking = false,
EnableFpga = false,
EnableIPForwarding = false,
NetworkSecurityGroup = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
Primary = false,
},
},
},
OsProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSProfileArgs
{
AdminPassword = "string",
AdminUsername = "string",
AllowExtensionOperations = false,
ComputerNamePrefix = "string",
CustomData = "string",
LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs
{
DisablePasswordAuthentication = false,
EnableVMAgentPlatformUpdates = false,
PatchSettings = new AzureNative.Compute.Inputs.LinuxPatchSettingsArgs
{
AssessmentMode = "string",
AutomaticByPlatformSettings = new AzureNative.Compute.Inputs.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs
{
BypassPlatformSafetyChecksOnUserSchedule = false,
RebootSetting = "string",
},
PatchMode = "string",
},
ProvisionVMAgent = false,
Ssh = new AzureNative.Compute.Inputs.SshConfigurationArgs
{
PublicKeys = new[]
{
new AzureNative.Compute.Inputs.SshPublicKeyArgs
{
KeyData = "string",
Path = "string",
},
},
},
},
RequireGuestProvisionSignal = false,
Secrets = new[]
{
new AzureNative.Compute.Inputs.VaultSecretGroupArgs
{
SourceVault = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
VaultCertificates = new[]
{
new AzureNative.Compute.Inputs.VaultCertificateArgs
{
CertificateStore = "string",
CertificateUrl = "string",
},
},
},
},
WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs
{
AdditionalUnattendContent = new[]
{
new AzureNative.Compute.Inputs.AdditionalUnattendContentArgs
{
ComponentName = AzureNative.Compute.ComponentName.Microsoft_Windows_Shell_Setup,
Content = "string",
PassName = AzureNative.Compute.PassName.OobeSystem,
SettingName = AzureNative.Compute.SettingNames.AutoLogon,
},
},
EnableAutomaticUpdates = false,
PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs
{
AssessmentMode = "string",
AutomaticByPlatformSettings = new AzureNative.Compute.Inputs.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs
{
BypassPlatformSafetyChecksOnUserSchedule = false,
RebootSetting = "string",
},
EnableHotpatching = false,
PatchMode = "string",
},
ProvisionVMAgent = false,
TimeZone = "string",
WinRM = new AzureNative.Compute.Inputs.WinRMConfigurationArgs
{
Listeners = new[]
{
new AzureNative.Compute.Inputs.WinRMListenerArgs
{
CertificateUrl = "string",
Protocol = AzureNative.Compute.ProtocolTypes.Http,
},
},
},
},
},
Priority = "string",
ScheduledEventsProfile = new AzureNative.Compute.Inputs.ScheduledEventsProfileArgs
{
OsImageNotificationProfile = new AzureNative.Compute.Inputs.OSImageNotificationProfileArgs
{
Enable = false,
NotBeforeTimeout = "string",
},
TerminateNotificationProfile = new AzureNative.Compute.Inputs.TerminateNotificationProfileArgs
{
Enable = false,
NotBeforeTimeout = "string",
},
},
SecurityPostureReference = new AzureNative.Compute.Inputs.SecurityPostureReferenceArgs
{
Id = "string",
ExcludeExtensions = new[]
{
"string",
},
IsOverridable = false,
},
SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs
{
EncryptionAtHost = false,
EncryptionIdentity = new AzureNative.Compute.Inputs.EncryptionIdentityArgs
{
UserAssignedIdentityResourceId = "string",
},
ProxyAgentSettings = new AzureNative.Compute.Inputs.ProxyAgentSettingsArgs
{
Enabled = false,
Imds = new AzureNative.Compute.Inputs.HostEndpointSettingsArgs
{
InVMAccessControlProfileReferenceId = "string",
Mode = "string",
},
KeyIncarnationId = 0,
Mode = "string",
WireServer = new AzureNative.Compute.Inputs.HostEndpointSettingsArgs
{
InVMAccessControlProfileReferenceId = "string",
Mode = "string",
},
},
SecurityType = "string",
UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs
{
SecureBootEnabled = false,
VTpmEnabled = false,
},
},
ServiceArtifactReference = new AzureNative.Compute.Inputs.ServiceArtifactReferenceArgs
{
Id = "string",
},
StorageProfile = new AzureNative.Compute.Inputs.VirtualMachineScaleSetStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.VirtualMachineScaleSetDataDiskArgs
{
CreateOption = "string",
Lun = 0,
Caching = AzureNative.Compute.CachingTypes.None,
DeleteOption = "string",
DiskIOPSReadWrite = 0,
DiskMBpsReadWrite = 0,
DiskSizeGB = 0,
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
SecurityEncryptionType = "string",
},
StorageAccountType = "string",
},
Name = "string",
WriteAcceleratorEnabled = false,
},
},
DiskControllerType = "string",
ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs
{
CommunityGalleryImageId = "string",
Id = "string",
Offer = "string",
Publisher = "string",
SharedGalleryImageId = "string",
Sku = "string",
Version = "string",
},
OsDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetOSDiskArgs
{
CreateOption = "string",
Caching = AzureNative.Compute.CachingTypes.None,
DeleteOption = "string",
DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs
{
Option = "string",
Placement = "string",
},
DiskSizeGB = 0,
Image = new AzureNative.Compute.Inputs.VirtualHardDiskArgs
{
Uri = "string",
},
ManagedDisk = new AzureNative.Compute.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
SecurityEncryptionType = "string",
},
StorageAccountType = "string",
},
Name = "string",
OsType = AzureNative.Compute.OperatingSystemTypes.Windows,
VhdContainers = new[]
{
"string",
},
WriteAcceleratorEnabled = false,
},
},
UserData = "string",
},
DoNotRunExtensionsOnOverprovisionedVMs = false,
ExtendedLocation = new AzureNative.Compute.Inputs.ExtendedLocationArgs
{
Name = "string",
Type = "string",
},
AutomaticRepairsPolicy = new AzureNative.Compute.Inputs.AutomaticRepairsPolicyArgs
{
Enabled = false,
GracePeriod = "string",
RepairAction = "string",
},
Identity = new AzureNative.Compute.Inputs.VirtualMachineScaleSetIdentityArgs
{
Type = AzureNative.Compute.ResourceIdentityType.SystemAssigned,
UserAssignedIdentities = new[]
{
"string",
},
},
Location = "string",
OrchestrationMode = "string",
Overprovision = false,
Plan = new AzureNative.Compute.Inputs.PlanArgs
{
Name = "string",
Product = "string",
PromotionCode = "string",
Publisher = "string",
},
PlatformFaultDomainCount = 0,
PriorityMixPolicy = new AzureNative.Compute.Inputs.PriorityMixPolicyArgs
{
BaseRegularPriorityCount = 0,
RegularPriorityPercentageAboveBase = 0,
},
ConstrainedMaximumCapacity = false,
ProximityPlacementGroup = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
HostGroup = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
ScaleInPolicy = new AzureNative.Compute.Inputs.ScaleInPolicyArgs
{
ForceDeletion = false,
PrioritizeUnhealthyVMs = false,
Rules = new[]
{
"string",
},
},
ScheduledEventsPolicy = new AzureNative.Compute.Inputs.ScheduledEventsPolicyArgs
{
ScheduledEventsAdditionalPublishingTargets = new AzureNative.Compute.Inputs.ScheduledEventsAdditionalPublishingTargetsArgs
{
EventGridAndResourceGraph = new AzureNative.Compute.Inputs.EventGridAndResourceGraphArgs
{
Enable = false,
},
},
UserInitiatedReboot = new AzureNative.Compute.Inputs.UserInitiatedRebootArgs
{
AutomaticallyApprove = false,
},
UserInitiatedRedeploy = new AzureNative.Compute.Inputs.UserInitiatedRedeployArgs
{
AutomaticallyApprove = false,
},
},
SinglePlacementGroup = false,
Sku = new AzureNative.Compute.Inputs.SkuArgs
{
Capacity = 0,
Name = "string",
Tier = "string",
},
SkuProfile = new AzureNative.Compute.Inputs.SkuProfileArgs
{
AllocationStrategy = "string",
VmSizes = new[]
{
new AzureNative.Compute.Inputs.SkuProfileVMSizeArgs
{
Name = "string",
Rank = 0,
},
},
},
SpotRestorePolicy = new AzureNative.Compute.Inputs.SpotRestorePolicyArgs
{
Enabled = false,
RestoreTimeout = "string",
},
Tags =
{
{ "string", "string" },
},
UpgradePolicy = new AzureNative.Compute.Inputs.UpgradePolicyArgs
{
AutomaticOSUpgradePolicy = new AzureNative.Compute.Inputs.AutomaticOSUpgradePolicyArgs
{
DisableAutomaticRollback = false,
EnableAutomaticOSUpgrade = false,
OsRollingUpgradeDeferral = false,
UseRollingUpgradePolicy = false,
},
Mode = AzureNative.Compute.UpgradeMode.Automatic,
RollingUpgradePolicy = new AzureNative.Compute.Inputs.RollingUpgradePolicyArgs
{
EnableCrossZoneUpgrade = false,
MaxBatchInstancePercent = 0,
MaxSurge = false,
MaxUnhealthyInstancePercent = 0,
MaxUnhealthyUpgradedInstancePercent = 0,
PauseTimeBetweenBatches = "string",
PrioritizeUnhealthyInstances = false,
RollbackFailedInstancesOnPolicyBreach = false,
},
},
AdditionalCapabilities = new AzureNative.Compute.Inputs.AdditionalCapabilitiesArgs
{
HibernationEnabled = false,
UltraSSDEnabled = false,
},
VmScaleSetName = "string",
ZonalPlatformFaultDomainAlignMode = "string",
ZoneBalance = false,
Zones = new[]
{
"string",
},
});
example, err := compute.NewVirtualMachineScaleSet(ctx, "virtualMachineScaleSetResource", &compute.VirtualMachineScaleSetArgs{
ResourceGroupName: pulumi.String("string"),
ResiliencyPolicy: &compute.ResiliencyPolicyArgs{
AutomaticZoneRebalancingPolicy: &compute.AutomaticZoneRebalancingPolicyArgs{
Enabled: pulumi.Bool(false),
RebalanceBehavior: pulumi.String("string"),
RebalanceStrategy: pulumi.String("string"),
},
ResilientVMCreationPolicy: &compute.ResilientVMCreationPolicyArgs{
Enabled: pulumi.Bool(false),
},
ResilientVMDeletionPolicy: &compute.ResilientVMDeletionPolicyArgs{
Enabled: pulumi.Bool(false),
},
},
VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfileArgs{
ApplicationProfile: &compute.ApplicationProfileArgs{
GalleryApplications: compute.VMGalleryApplicationArray{
&compute.VMGalleryApplicationArgs{
PackageReferenceId: pulumi.String("string"),
ConfigurationReference: pulumi.String("string"),
EnableAutomaticUpgrade: pulumi.Bool(false),
Order: pulumi.Int(0),
Tags: pulumi.String("string"),
TreatFailureAsDeploymentFailure: pulumi.Bool(false),
},
},
},
BillingProfile: &compute.BillingProfileArgs{
MaxPrice: pulumi.Float64(0),
},
CapacityReservation: &compute.CapacityReservationProfileArgs{
CapacityReservationGroup: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
DiagnosticsProfile: &compute.DiagnosticsProfileArgs{
BootDiagnostics: &compute.BootDiagnosticsArgs{
Enabled: pulumi.Bool(false),
StorageUri: pulumi.String("string"),
},
},
EvictionPolicy: pulumi.String("string"),
ExtensionProfile: &compute.VirtualMachineScaleSetExtensionProfileArgs{
Extensions: compute.VirtualMachineScaleSetExtensionTypeArray{
&compute.VirtualMachineScaleSetExtensionTypeArgs{
AutoUpgradeMinorVersion: pulumi.Bool(false),
EnableAutomaticUpgrade: pulumi.Bool(false),
ForceUpdateTag: pulumi.String("string"),
Name: pulumi.String("string"),
ProtectedSettings: pulumi.Any("any"),
ProtectedSettingsFromKeyVault: &compute.KeyVaultSecretReferenceArgs{
SecretUrl: pulumi.String("string"),
SourceVault: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
ProvisionAfterExtensions: pulumi.StringArray{
pulumi.String("string"),
},
Publisher: pulumi.String("string"),
Settings: pulumi.Any("any"),
SuppressFailures: pulumi.Bool(false),
Type: pulumi.String("string"),
TypeHandlerVersion: pulumi.String("string"),
},
},
ExtensionsTimeBudget: pulumi.String("string"),
},
HardwareProfile: &compute.VirtualMachineScaleSetHardwareProfileArgs{
VmSizeProperties: &compute.VMSizePropertiesArgs{
VCPUsAvailable: pulumi.Int(0),
VCPUsPerCore: pulumi.Int(0),
},
},
LicenseType: pulumi.String("string"),
NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfileArgs{
HealthProbe: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("string"),
},
NetworkApiVersion: pulumi.String("string"),
NetworkInterfaceConfigurations: compute.VirtualMachineScaleSetNetworkConfigurationArray{
&compute.VirtualMachineScaleSetNetworkConfigurationArgs{
IpConfigurations: compute.VirtualMachineScaleSetIPConfigurationArray{
&compute.VirtualMachineScaleSetIPConfigurationArgs{
Name: pulumi.String("string"),
ApplicationGatewayBackendAddressPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
ApplicationSecurityGroups: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
LoadBalancerBackendAddressPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
LoadBalancerInboundNatPools: compute.SubResourceArray{
&compute.SubResourceArgs{
Id: pulumi.String("string"),
},
},
Primary: pulumi.Bool(false),
PrivateIPAddressVersion: pulumi.String("string"),
PublicIPAddressConfiguration: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationArgs{
Name: pulumi.String("string"),
DeleteOption: pulumi.String("string"),
DnsSettings: &compute.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs{
DomainNameLabel: pulumi.String("string"),
DomainNameLabelScope: pulumi.String("string"),
},
IdleTimeoutInMinutes: pulumi.Int(0),
IpTags: compute.VirtualMachineScaleSetIpTagArray{
&compute.VirtualMachineScaleSetIpTagArgs{
IpTagType: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
PublicIPAddressVersion: pulumi.String("string"),
PublicIPPrefix: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
Sku: &compute.PublicIPAddressSkuArgs{
Name: pulumi.String("string"),
Tier: pulumi.String("string"),
},
},
Subnet: &compute.ApiEntityReferenceArgs{
Id: pulumi.String("string"),
},
},
},
Name: pulumi.String("string"),
AuxiliaryMode: pulumi.String("string"),
AuxiliarySku: pulumi.String("string"),
DeleteOption: pulumi.String("string"),
DisableTcpStateTracking: pulumi.Bool(false),
DnsSettings: &compute.VirtualMachineScaleSetNetworkConfigurationDnsSettingsArgs{
DnsServers: pulumi.StringArray{
pulumi.String("string"),
},
},
EnableAcceleratedNetworking: pulumi.Bool(false),
EnableFpga: pulumi.Bool(false),
EnableIPForwarding: pulumi.Bool(false),
NetworkSecurityGroup: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
Primary: pulumi.Bool(false),
},
},
},
OsProfile: &compute.VirtualMachineScaleSetOSProfileArgs{
AdminPassword: pulumi.String("string"),
AdminUsername: pulumi.String("string"),
AllowExtensionOperations: pulumi.Bool(false),
ComputerNamePrefix: pulumi.String("string"),
CustomData: pulumi.String("string"),
LinuxConfiguration: &compute.LinuxConfigurationArgs{
DisablePasswordAuthentication: pulumi.Bool(false),
EnableVMAgentPlatformUpdates: pulumi.Bool(false),
PatchSettings: &compute.LinuxPatchSettingsArgs{
AssessmentMode: pulumi.String("string"),
AutomaticByPlatformSettings: &compute.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs{
BypassPlatformSafetyChecksOnUserSchedule: pulumi.Bool(false),
RebootSetting: pulumi.String("string"),
},
PatchMode: pulumi.String("string"),
},
ProvisionVMAgent: pulumi.Bool(false),
Ssh: &compute.SshConfigurationArgs{
PublicKeys: compute.SshPublicKeyTypeArray{
&compute.SshPublicKeyTypeArgs{
KeyData: pulumi.String("string"),
Path: pulumi.String("string"),
},
},
},
},
RequireGuestProvisionSignal: pulumi.Bool(false),
Secrets: compute.VaultSecretGroupArray{
&compute.VaultSecretGroupArgs{
SourceVault: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
VaultCertificates: compute.VaultCertificateArray{
&compute.VaultCertificateArgs{
CertificateStore: pulumi.String("string"),
CertificateUrl: pulumi.String("string"),
},
},
},
},
WindowsConfiguration: &compute.WindowsConfigurationArgs{
AdditionalUnattendContent: compute.AdditionalUnattendContentArray{
&compute.AdditionalUnattendContentArgs{
ComponentName: compute.ComponentName_Microsoft_Windows_Shell_Setup,
Content: pulumi.String("string"),
PassName: compute.PassNameOobeSystem,
SettingName: compute.SettingNamesAutoLogon,
},
},
EnableAutomaticUpdates: pulumi.Bool(false),
PatchSettings: &compute.PatchSettingsArgs{
AssessmentMode: pulumi.String("string"),
AutomaticByPlatformSettings: &compute.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs{
BypassPlatformSafetyChecksOnUserSchedule: pulumi.Bool(false),
RebootSetting: pulumi.String("string"),
},
EnableHotpatching: pulumi.Bool(false),
PatchMode: pulumi.String("string"),
},
ProvisionVMAgent: pulumi.Bool(false),
TimeZone: pulumi.String("string"),
WinRM: &compute.WinRMConfigurationArgs{
Listeners: compute.WinRMListenerArray{
&compute.WinRMListenerArgs{
CertificateUrl: pulumi.String("string"),
Protocol: compute.ProtocolTypesHttp,
},
},
},
},
},
Priority: pulumi.String("string"),
ScheduledEventsProfile: &compute.ScheduledEventsProfileArgs{
OsImageNotificationProfile: &compute.OSImageNotificationProfileArgs{
Enable: pulumi.Bool(false),
NotBeforeTimeout: pulumi.String("string"),
},
TerminateNotificationProfile: &compute.TerminateNotificationProfileArgs{
Enable: pulumi.Bool(false),
NotBeforeTimeout: pulumi.String("string"),
},
},
SecurityPostureReference: &compute.SecurityPostureReferenceArgs{
Id: pulumi.String("string"),
ExcludeExtensions: pulumi.StringArray{
pulumi.String("string"),
},
IsOverridable: pulumi.Bool(false),
},
SecurityProfile: &compute.SecurityProfileArgs{
EncryptionAtHost: pulumi.Bool(false),
EncryptionIdentity: &compute.EncryptionIdentityArgs{
UserAssignedIdentityResourceId: pulumi.String("string"),
},
ProxyAgentSettings: &compute.ProxyAgentSettingsArgs{
Enabled: pulumi.Bool(false),
Imds: &compute.HostEndpointSettingsArgs{
InVMAccessControlProfileReferenceId: pulumi.String("string"),
Mode: pulumi.String("string"),
},
KeyIncarnationId: pulumi.Int(0),
Mode: pulumi.String("string"),
WireServer: &compute.HostEndpointSettingsArgs{
InVMAccessControlProfileReferenceId: pulumi.String("string"),
Mode: pulumi.String("string"),
},
},
SecurityType: pulumi.String("string"),
UefiSettings: &compute.UefiSettingsArgs{
SecureBootEnabled: pulumi.Bool(false),
VTpmEnabled: pulumi.Bool(false),
},
},
ServiceArtifactReference: &compute.ServiceArtifactReferenceArgs{
Id: pulumi.String("string"),
},
StorageProfile: &compute.VirtualMachineScaleSetStorageProfileArgs{
DataDisks: compute.VirtualMachineScaleSetDataDiskArray{
&compute.VirtualMachineScaleSetDataDiskArgs{
CreateOption: pulumi.String("string"),
Lun: pulumi.Int(0),
Caching: compute.CachingTypesNone,
DeleteOption: pulumi.String("string"),
DiskIOPSReadWrite: pulumi.Float64(0),
DiskMBpsReadWrite: pulumi.Float64(0),
DiskSizeGB: pulumi.Int(0),
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
SecurityProfile: &compute.VMDiskSecurityProfileArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
SecurityEncryptionType: pulumi.String("string"),
},
StorageAccountType: pulumi.String("string"),
},
Name: pulumi.String("string"),
WriteAcceleratorEnabled: pulumi.Bool(false),
},
},
DiskControllerType: pulumi.String("string"),
ImageReference: &compute.ImageReferenceArgs{
CommunityGalleryImageId: pulumi.String("string"),
Id: pulumi.String("string"),
Offer: pulumi.String("string"),
Publisher: pulumi.String("string"),
SharedGalleryImageId: pulumi.String("string"),
Sku: pulumi.String("string"),
Version: pulumi.String("string"),
},
OsDisk: &compute.VirtualMachineScaleSetOSDiskArgs{
CreateOption: pulumi.String("string"),
Caching: compute.CachingTypesNone,
DeleteOption: pulumi.String("string"),
DiffDiskSettings: &compute.DiffDiskSettingsArgs{
Option: pulumi.String("string"),
Placement: pulumi.String("string"),
},
DiskSizeGB: pulumi.Int(0),
Image: &compute.VirtualHardDiskArgs{
Uri: pulumi.String("string"),
},
ManagedDisk: &compute.VirtualMachineScaleSetManagedDiskParametersArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
SecurityProfile: &compute.VMDiskSecurityProfileArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
SecurityEncryptionType: pulumi.String("string"),
},
StorageAccountType: pulumi.String("string"),
},
Name: pulumi.String("string"),
OsType: compute.OperatingSystemTypesWindows,
VhdContainers: pulumi.StringArray{
pulumi.String("string"),
},
WriteAcceleratorEnabled: pulumi.Bool(false),
},
},
UserData: pulumi.String("string"),
},
DoNotRunExtensionsOnOverprovisionedVMs: pulumi.Bool(false),
ExtendedLocation: &compute.ExtendedLocationArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
AutomaticRepairsPolicy: &compute.AutomaticRepairsPolicyArgs{
Enabled: pulumi.Bool(false),
GracePeriod: pulumi.String("string"),
RepairAction: pulumi.String("string"),
},
Identity: &compute.VirtualMachineScaleSetIdentityArgs{
Type: compute.ResourceIdentityTypeSystemAssigned,
UserAssignedIdentities: pulumi.StringArray{
pulumi.String("string"),
},
},
Location: pulumi.String("string"),
OrchestrationMode: pulumi.String("string"),
Overprovision: pulumi.Bool(false),
Plan: &compute.PlanArgs{
Name: pulumi.String("string"),
Product: pulumi.String("string"),
PromotionCode: pulumi.String("string"),
Publisher: pulumi.String("string"),
},
PlatformFaultDomainCount: pulumi.Int(0),
PriorityMixPolicy: &compute.PriorityMixPolicyArgs{
BaseRegularPriorityCount: pulumi.Int(0),
RegularPriorityPercentageAboveBase: pulumi.Int(0),
},
ConstrainedMaximumCapacity: pulumi.Bool(false),
ProximityPlacementGroup: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
HostGroup: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
ScaleInPolicy: &compute.ScaleInPolicyArgs{
ForceDeletion: pulumi.Bool(false),
PrioritizeUnhealthyVMs: pulumi.Bool(false),
Rules: pulumi.StringArray{
pulumi.String("string"),
},
},
ScheduledEventsPolicy: &compute.ScheduledEventsPolicyArgs{
ScheduledEventsAdditionalPublishingTargets: &compute.ScheduledEventsAdditionalPublishingTargetsArgs{
EventGridAndResourceGraph: &compute.EventGridAndResourceGraphArgs{
Enable: pulumi.Bool(false),
},
},
UserInitiatedReboot: &compute.UserInitiatedRebootArgs{
AutomaticallyApprove: pulumi.Bool(false),
},
UserInitiatedRedeploy: &compute.UserInitiatedRedeployArgs{
AutomaticallyApprove: pulumi.Bool(false),
},
},
SinglePlacementGroup: pulumi.Bool(false),
Sku: &compute.SkuArgs{
Capacity: pulumi.Float64(0),
Name: pulumi.String("string"),
Tier: pulumi.String("string"),
},
SkuProfile: &compute.SkuProfileArgs{
AllocationStrategy: pulumi.String("string"),
VmSizes: compute.SkuProfileVMSizeArray{
&compute.SkuProfileVMSizeArgs{
Name: pulumi.String("string"),
Rank: pulumi.Int(0),
},
},
},
SpotRestorePolicy: &compute.SpotRestorePolicyArgs{
Enabled: pulumi.Bool(false),
RestoreTimeout: pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
UpgradePolicy: &compute.UpgradePolicyArgs{
AutomaticOSUpgradePolicy: &compute.AutomaticOSUpgradePolicyArgs{
DisableAutomaticRollback: pulumi.Bool(false),
EnableAutomaticOSUpgrade: pulumi.Bool(false),
OsRollingUpgradeDeferral: pulumi.Bool(false),
UseRollingUpgradePolicy: pulumi.Bool(false),
},
Mode: compute.UpgradeModeAutomatic,
RollingUpgradePolicy: &compute.RollingUpgradePolicyArgs{
EnableCrossZoneUpgrade: pulumi.Bool(false),
MaxBatchInstancePercent: pulumi.Int(0),
MaxSurge: pulumi.Bool(false),
MaxUnhealthyInstancePercent: pulumi.Int(0),
MaxUnhealthyUpgradedInstancePercent: pulumi.Int(0),
PauseTimeBetweenBatches: pulumi.String("string"),
PrioritizeUnhealthyInstances: pulumi.Bool(false),
RollbackFailedInstancesOnPolicyBreach: pulumi.Bool(false),
},
},
AdditionalCapabilities: &compute.AdditionalCapabilitiesArgs{
HibernationEnabled: pulumi.Bool(false),
UltraSSDEnabled: pulumi.Bool(false),
},
VmScaleSetName: pulumi.String("string"),
ZonalPlatformFaultDomainAlignMode: pulumi.String("string"),
ZoneBalance: pulumi.Bool(false),
Zones: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "azure-native_compute_virtualmachinescaleset" "virtualMachineScaleSetResource" {
resource_group_name = "string"
resiliency_policy = {
automatic_zone_rebalancing_policy = {
enabled = false
rebalance_behavior = "string"
rebalance_strategy = "string"
}
resilient_vm_creation_policy = {
enabled = false
}
resilient_vm_deletion_policy = {
enabled = false
}
}
virtual_machine_profile = {
application_profile = {
gallery_applications = [{
"packageReferenceId" = "string"
"configurationReference" = "string"
"enableAutomaticUpgrade" = false
"order" = 0
"tags" = "string"
"treatFailureAsDeploymentFailure" = false
}]
}
billing_profile = {
max_price = 0
}
capacity_reservation = {
capacity_reservation_group = {
id = "string"
}
}
diagnostics_profile = {
boot_diagnostics = {
enabled = false
storage_uri = "string"
}
}
eviction_policy = "string"
extension_profile = {
extensions = [{
"autoUpgradeMinorVersion" = false
"enableAutomaticUpgrade" = false
"forceUpdateTag" = "string"
"name" = "string"
"protectedSettings" = "any"
"protectedSettingsFromKeyVault" = {
"secretUrl" = "string"
"sourceVault" = {
"id" = "string"
}
}
"provisionAfterExtensions" = ["string"]
"publisher" = "string"
"settings" = "any"
"suppressFailures" = false
"type" = "string"
"typeHandlerVersion" = "string"
}]
extensions_time_budget = "string"
}
hardware_profile = {
vm_size_properties = {
v_cp_us_available = 0
v_cp_us_per_core = 0
}
}
license_type = "string"
network_profile = {
health_probe = {
id = "string"
}
network_api_version = "string"
network_interface_configurations = [{
"ipConfigurations" = [{
"name" = "string"
"applicationGatewayBackendAddressPools" = [{
"id" = "string"
}]
"applicationSecurityGroups" = [{
"id" = "string"
}]
"loadBalancerBackendAddressPools" = [{
"id" = "string"
}]
"loadBalancerInboundNatPools" = [{
"id" = "string"
}]
"primary" = false
"privateIPAddressVersion" = "string"
"publicIPAddressConfiguration" = {
"name" = "string"
"deleteOption" = "string"
"dnsSettings" = {
"domainNameLabel" = "string"
"domainNameLabelScope" = "string"
}
"idleTimeoutInMinutes" = 0
"ipTags" = [{
"ipTagType" = "string"
"tag" = "string"
}]
"publicIPAddressVersion" = "string"
"publicIPPrefix" = {
"id" = "string"
}
"sku" = {
"name" = "string"
"tier" = "string"
}
}
"subnet" = {
"id" = "string"
}
}]
"name" = "string"
"auxiliaryMode" = "string"
"auxiliarySku" = "string"
"deleteOption" = "string"
"disableTcpStateTracking" = false
"dnsSettings" = {
"dnsServers" = ["string"]
}
"enableAcceleratedNetworking" = false
"enableFpga" = false
"enableIPForwarding" = false
"networkSecurityGroup" = {
"id" = "string"
}
"primary" = false
}]
}
os_profile = {
admin_password = "string"
admin_username = "string"
allow_extension_operations = false
computer_name_prefix = "string"
custom_data = "string"
linux_configuration = {
disable_password_authentication = false
enable_vm_agent_platform_updates = false
patch_settings = {
assessment_mode = "string"
automatic_by_platform_settings = {
bypass_platform_safety_checks_on_user_schedule = false
reboot_setting = "string"
}
patch_mode = "string"
}
provision_vm_agent = false
ssh = {
public_keys = [{
"keyData" = "string"
"path" = "string"
}]
}
}
require_guest_provision_signal = false
secrets = [{
"sourceVault" = {
"id" = "string"
}
"vaultCertificates" = [{
"certificateStore" = "string"
"certificateUrl" = "string"
}]
}]
windows_configuration = {
additional_unattend_content = [{
"componentName" = "Microsoft-Windows-Shell-Setup"
"content" = "string"
"passName" = "OobeSystem"
"settingName" = "AutoLogon"
}]
enable_automatic_updates = false
patch_settings = {
assessment_mode = "string"
automatic_by_platform_settings = {
bypass_platform_safety_checks_on_user_schedule = false
reboot_setting = "string"
}
enable_hotpatching = false
patch_mode = "string"
}
provision_vm_agent = false
time_zone = "string"
win_rm = {
listeners = [{
"certificateUrl" = "string"
"protocol" = "Http"
}]
}
}
}
priority = "string"
scheduled_events_profile = {
os_image_notification_profile = {
enable = false
not_before_timeout = "string"
}
terminate_notification_profile = {
enable = false
not_before_timeout = "string"
}
}
security_posture_reference = {
id = "string"
exclude_extensions = ["string"]
is_overridable = false
}
security_profile = {
encryption_at_host = false
encryption_identity = {
user_assigned_identity_resource_id = "string"
}
proxy_agent_settings = {
enabled = false
imds = {
in_vm_access_control_profile_reference_id = "string"
mode = "string"
}
key_incarnation_id = 0
mode = "string"
wire_server = {
in_vm_access_control_profile_reference_id = "string"
mode = "string"
}
}
security_type = "string"
uefi_settings = {
secure_boot_enabled = false
v_tpm_enabled = false
}
}
service_artifact_reference = {
id = "string"
}
storage_profile = {
data_disks = [{
"createOption" = "string"
"lun" = 0
"caching" = "None"
"deleteOption" = "string"
"diskIOPSReadWrite" = 0
"diskMBpsReadWrite" = 0
"diskSizeGB" = 0
"managedDisk" = {
"diskEncryptionSet" = {
"id" = "string"
}
"securityProfile" = {
"diskEncryptionSet" = {
"id" = "string"
}
"securityEncryptionType" = "string"
}
"storageAccountType" = "string"
}
"name" = "string"
"writeAcceleratorEnabled" = false
}]
disk_controller_type = "string"
image_reference = {
community_gallery_image_id = "string"
id = "string"
offer = "string"
publisher = "string"
shared_gallery_image_id = "string"
sku = "string"
version = "string"
}
os_disk = {
create_option = "string"
caching = "None"
delete_option = "string"
diff_disk_settings = {
option = "string"
placement = "string"
}
disk_size_gb = 0
image = {
uri = "string"
}
managed_disk = {
disk_encryption_set = {
id = "string"
}
security_profile = {
disk_encryption_set = {
id = "string"
}
security_encryption_type = "string"
}
storage_account_type = "string"
}
name = "string"
os_type = "Windows"
vhd_containers = ["string"]
write_accelerator_enabled = false
}
}
user_data = "string"
}
do_not_run_extensions_on_overprovisioned_v_ms = false
extended_location = {
name = "string"
type = "string"
}
automatic_repairs_policy = {
enabled = false
grace_period = "string"
repair_action = "string"
}
identity = {
type = "SystemAssigned"
user_assigned_identities = ["string"]
}
location = "string"
orchestration_mode = "string"
overprovision = false
plan = {
name = "string"
product = "string"
promotion_code = "string"
publisher = "string"
}
platform_fault_domain_count = 0
priority_mix_policy = {
base_regular_priority_count = 0
regular_priority_percentage_above_base = 0
}
constrained_maximum_capacity = false
proximity_placement_group = {
id = "string"
}
host_group = {
id = "string"
}
scale_in_policy = {
force_deletion = false
prioritize_unhealthy_v_ms = false
rules = ["string"]
}
scheduled_events_policy = {
scheduled_events_additional_publishing_targets = {
event_grid_and_resource_graph = {
enable = false
}
}
user_initiated_reboot = {
automatically_approve = false
}
user_initiated_redeploy = {
automatically_approve = false
}
}
single_placement_group = false
sku = {
capacity = 0
name = "string"
tier = "string"
}
sku_profile = {
allocation_strategy = "string"
vm_sizes = [{
"name" = "string"
"rank" = 0
}]
}
spot_restore_policy = {
enabled = false
restore_timeout = "string"
}
tags = {
"string" = "string"
}
upgrade_policy = {
automatic_os_upgrade_policy = {
disable_automatic_rollback = false
enable_automatic_os_upgrade = false
os_rolling_upgrade_deferral = false
use_rolling_upgrade_policy = false
}
mode = "Automatic"
rolling_upgrade_policy = {
enable_cross_zone_upgrade = false
max_batch_instance_percent = 0
max_surge = false
max_unhealthy_instance_percent = 0
max_unhealthy_upgraded_instance_percent = 0
pause_time_between_batches = "string"
prioritize_unhealthy_instances = false
rollback_failed_instances_on_policy_breach = false
}
}
additional_capabilities = {
hibernation_enabled = false
ultra_ssd_enabled = false
}
vm_scale_set_name = "string"
zonal_platform_fault_domain_align_mode = "string"
zone_balance = false
zones = ["string"]
}
var virtualMachineScaleSetResource = new VirtualMachineScaleSet("virtualMachineScaleSetResource", VirtualMachineScaleSetArgs.builder()
.resourceGroupName("string")
.resiliencyPolicy(ResiliencyPolicyArgs.builder()
.automaticZoneRebalancingPolicy(AutomaticZoneRebalancingPolicyArgs.builder()
.enabled(false)
.rebalanceBehavior("string")
.rebalanceStrategy("string")
.build())
.resilientVMCreationPolicy(ResilientVMCreationPolicyArgs.builder()
.enabled(false)
.build())
.resilientVMDeletionPolicy(ResilientVMDeletionPolicyArgs.builder()
.enabled(false)
.build())
.build())
.virtualMachineProfile(VirtualMachineScaleSetVMProfileArgs.builder()
.applicationProfile(ApplicationProfileArgs.builder()
.galleryApplications(VMGalleryApplicationArgs.builder()
.packageReferenceId("string")
.configurationReference("string")
.enableAutomaticUpgrade(false)
.order(0)
.tags("string")
.treatFailureAsDeploymentFailure(false)
.build())
.build())
.billingProfile(BillingProfileArgs.builder()
.maxPrice(0.0)
.build())
.capacityReservation(CapacityReservationProfileArgs.builder()
.capacityReservationGroup(SubResourceArgs.builder()
.id("string")
.build())
.build())
.diagnosticsProfile(DiagnosticsProfileArgs.builder()
.bootDiagnostics(BootDiagnosticsArgs.builder()
.enabled(false)
.storageUri("string")
.build())
.build())
.evictionPolicy("string")
.extensionProfile(VirtualMachineScaleSetExtensionProfileArgs.builder()
.extensions(VirtualMachineScaleSetExtensionArgs.builder()
.autoUpgradeMinorVersion(false)
.enableAutomaticUpgrade(false)
.forceUpdateTag("string")
.name("string")
.protectedSettings("any")
.protectedSettingsFromKeyVault(KeyVaultSecretReferenceArgs.builder()
.secretUrl("string")
.sourceVault(SubResourceArgs.builder()
.id("string")
.build())
.build())
.provisionAfterExtensions("string")
.publisher("string")
.settings("any")
.suppressFailures(false)
.type("string")
.typeHandlerVersion("string")
.build())
.extensionsTimeBudget("string")
.build())
.hardwareProfile(VirtualMachineScaleSetHardwareProfileArgs.builder()
.vmSizeProperties(VMSizePropertiesArgs.builder()
.vCPUsAvailable(0)
.vCPUsPerCore(0)
.build())
.build())
.licenseType("string")
.networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
.healthProbe(ApiEntityReferenceArgs.builder()
.id("string")
.build())
.networkApiVersion("string")
.networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
.ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
.name("string")
.applicationGatewayBackendAddressPools(SubResourceArgs.builder()
.id("string")
.build())
.applicationSecurityGroups(SubResourceArgs.builder()
.id("string")
.build())
.loadBalancerBackendAddressPools(SubResourceArgs.builder()
.id("string")
.build())
.loadBalancerInboundNatPools(SubResourceArgs.builder()
.id("string")
.build())
.primary(false)
.privateIPAddressVersion("string")
.publicIPAddressConfiguration(VirtualMachineScaleSetPublicIPAddressConfigurationArgs.builder()
.name("string")
.deleteOption("string")
.dnsSettings(VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettingsArgs.builder()
.domainNameLabel("string")
.domainNameLabelScope("string")
.build())
.idleTimeoutInMinutes(0)
.ipTags(VirtualMachineScaleSetIpTagArgs.builder()
.ipTagType("string")
.tag("string")
.build())
.publicIPAddressVersion("string")
.publicIPPrefix(SubResourceArgs.builder()
.id("string")
.build())
.sku(PublicIPAddressSkuArgs.builder()
.name("string")
.tier("string")
.build())
.build())
.subnet(ApiEntityReferenceArgs.builder()
.id("string")
.build())
.build())
.name("string")
.auxiliaryMode("string")
.auxiliarySku("string")
.deleteOption("string")
.disableTcpStateTracking(false)
.dnsSettings(VirtualMachineScaleSetNetworkConfigurationDnsSettingsArgs.builder()
.dnsServers("string")
.build())
.enableAcceleratedNetworking(false)
.enableFpga(false)
.enableIPForwarding(false)
.networkSecurityGroup(SubResourceArgs.builder()
.id("string")
.build())
.primary(false)
.build())
.build())
.osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
.adminPassword("string")
.adminUsername("string")
.allowExtensionOperations(false)
.computerNamePrefix("string")
.customData("string")
.linuxConfiguration(LinuxConfigurationArgs.builder()
.disablePasswordAuthentication(false)
.enableVMAgentPlatformUpdates(false)
.patchSettings(LinuxPatchSettingsArgs.builder()
.assessmentMode("string")
.automaticByPlatformSettings(LinuxVMGuestPatchAutomaticByPlatformSettingsArgs.builder()
.bypassPlatformSafetyChecksOnUserSchedule(false)
.rebootSetting("string")
.build())
.patchMode("string")
.build())
.provisionVMAgent(false)
.ssh(SshConfigurationArgs.builder()
.publicKeys(SshPublicKeyArgs.builder()
.keyData("string")
.path("string")
.build())
.build())
.build())
.requireGuestProvisionSignal(false)
.secrets(VaultSecretGroupArgs.builder()
.sourceVault(SubResourceArgs.builder()
.id("string")
.build())
.vaultCertificates(VaultCertificateArgs.builder()
.certificateStore("string")
.certificateUrl("string")
.build())
.build())
.windowsConfiguration(WindowsConfigurationArgs.builder()
.additionalUnattendContent(AdditionalUnattendContentArgs.builder()
.componentName("Microsoft-Windows-Shell-Setup")
.content("string")
.passName("OobeSystem")
.settingName("AutoLogon")
.build())
.enableAutomaticUpdates(false)
.patchSettings(PatchSettingsArgs.builder()
.assessmentMode("string")
.automaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettingsArgs.builder()
.bypassPlatformSafetyChecksOnUserSchedule(false)
.rebootSetting("string")
.build())
.enableHotpatching(false)
.patchMode("string")
.build())
.provisionVMAgent(false)
.timeZone("string")
.winRM(WinRMConfigurationArgs.builder()
.listeners(WinRMListenerArgs.builder()
.certificateUrl("string")
.protocol("Http")
.build())
.build())
.build())
.build())
.priority("string")
.scheduledEventsProfile(ScheduledEventsProfileArgs.builder()
.osImageNotificationProfile(OSImageNotificationProfileArgs.builder()
.enable(false)
.notBeforeTimeout("string")
.build())
.terminateNotificationProfile(TerminateNotificationProfileArgs.builder()
.enable(false)
.notBeforeTimeout("string")
.build())
.build())
.securityPostureReference(SecurityPostureReferenceArgs.builder()
.id("string")
.excludeExtensions("string")
.isOverridable(false)
.build())
.securityProfile(SecurityProfileArgs.builder()
.encryptionAtHost(false)
.encryptionIdentity(EncryptionIdentityArgs.builder()
.userAssignedIdentityResourceId("string")
.build())
.proxyAgentSettings(ProxyAgentSettingsArgs.builder()
.enabled(false)
.imds(HostEndpointSettingsArgs.builder()
.inVMAccessControlProfileReferenceId("string")
.mode("string")
.build())
.keyIncarnationId(0)
.mode("string")
.wireServer(HostEndpointSettingsArgs.builder()
.inVMAccessControlProfileReferenceId("string")
.mode("string")
.build())
.build())
.securityType("string")
.uefiSettings(UefiSettingsArgs.builder()
.secureBootEnabled(false)
.vTpmEnabled(false)
.build())
.build())
.serviceArtifactReference(ServiceArtifactReferenceArgs.builder()
.id("string")
.build())
.storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
.dataDisks(VirtualMachineScaleSetDataDiskArgs.builder()
.createOption("string")
.lun(0)
.caching("None")
.deleteOption("string")
.diskIOPSReadWrite(0.0)
.diskMBpsReadWrite(0.0)
.diskSizeGB(0)
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.securityProfile(VMDiskSecurityProfileArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.securityEncryptionType("string")
.build())
.storageAccountType("string")
.build())
.name("string")
.writeAcceleratorEnabled(false)
.build())
.diskControllerType("string")
.imageReference(ImageReferenceArgs.builder()
.communityGalleryImageId("string")
.id("string")
.offer("string")
.publisher("string")
.sharedGalleryImageId("string")
.sku("string")
.version("string")
.build())
.osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
.createOption("string")
.caching("None")
.deleteOption("string")
.diffDiskSettings(DiffDiskSettingsArgs.builder()
.option("string")
.placement("string")
.build())
.diskSizeGB(0)
.image(VirtualHardDiskArgs.builder()
.uri("string")
.build())
.managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.securityProfile(VMDiskSecurityProfileArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.securityEncryptionType("string")
.build())
.storageAccountType("string")
.build())
.name("string")
.osType("Windows")
.vhdContainers("string")
.writeAcceleratorEnabled(false)
.build())
.build())
.userData("string")
.build())
.doNotRunExtensionsOnOverprovisionedVMs(false)
.extendedLocation(ExtendedLocationArgs.builder()
.name("string")
.type("string")
.build())
.automaticRepairsPolicy(AutomaticRepairsPolicyArgs.builder()
.enabled(false)
.gracePeriod("string")
.repairAction("string")
.build())
.identity(VirtualMachineScaleSetIdentityArgs.builder()
.type("SystemAssigned")
.userAssignedIdentities("string")
.build())
.location("string")
.orchestrationMode("string")
.overprovision(false)
.plan(PlanArgs.builder()
.name("string")
.product("string")
.promotionCode("string")
.publisher("string")
.build())
.platformFaultDomainCount(0)
.priorityMixPolicy(PriorityMixPolicyArgs.builder()
.baseRegularPriorityCount(0)
.regularPriorityPercentageAboveBase(0)
.build())
.constrainedMaximumCapacity(false)
.proximityPlacementGroup(SubResourceArgs.builder()
.id("string")
.build())
.hostGroup(SubResourceArgs.builder()
.id("string")
.build())
.scaleInPolicy(ScaleInPolicyArgs.builder()
.forceDeletion(false)
.prioritizeUnhealthyVMs(false)
.rules("string")
.build())
.scheduledEventsPolicy(ScheduledEventsPolicyArgs.builder()
.scheduledEventsAdditionalPublishingTargets(ScheduledEventsAdditionalPublishingTargetsArgs.builder()
.eventGridAndResourceGraph(EventGridAndResourceGraphArgs.builder()
.enable(false)
.build())
.build())
.userInitiatedReboot(UserInitiatedRebootArgs.builder()
.automaticallyApprove(false)
.build())
.userInitiatedRedeploy(UserInitiatedRedeployArgs.builder()
.automaticallyApprove(false)
.build())
.build())
.singlePlacementGroup(false)
.sku(SkuArgs.builder()
.capacity(0.0)
.name("string")
.tier("string")
.build())
.skuProfile(SkuProfileArgs.builder()
.allocationStrategy("string")
.vmSizes(SkuProfileVMSizeArgs.builder()
.name("string")
.rank(0)
.build())
.build())
.spotRestorePolicy(SpotRestorePolicyArgs.builder()
.enabled(false)
.restoreTimeout("string")
.build())
.tags(Map.of("string", "string"))
.upgradePolicy(UpgradePolicyArgs.builder()
.automaticOSUpgradePolicy(AutomaticOSUpgradePolicyArgs.builder()
.disableAutomaticRollback(false)
.enableAutomaticOSUpgrade(false)
.osRollingUpgradeDeferral(false)
.useRollingUpgradePolicy(false)
.build())
.mode("Automatic")
.rollingUpgradePolicy(RollingUpgradePolicyArgs.builder()
.enableCrossZoneUpgrade(false)
.maxBatchInstancePercent(0)
.maxSurge(false)
.maxUnhealthyInstancePercent(0)
.maxUnhealthyUpgradedInstancePercent(0)
.pauseTimeBetweenBatches("string")
.prioritizeUnhealthyInstances(false)
.rollbackFailedInstancesOnPolicyBreach(false)
.build())
.build())
.additionalCapabilities(AdditionalCapabilitiesArgs.builder()
.hibernationEnabled(false)
.ultraSSDEnabled(false)
.build())
.vmScaleSetName("string")
.zonalPlatformFaultDomainAlignMode("string")
.zoneBalance(false)
.zones("string")
.build());
virtual_machine_scale_set_resource = azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSetResource",
resource_group_name="string",
resiliency_policy={
"automatic_zone_rebalancing_policy": {
"enabled": False,
"rebalance_behavior": "string",
"rebalance_strategy": "string",
},
"resilient_vm_creation_policy": {
"enabled": False,
},
"resilient_vm_deletion_policy": {
"enabled": False,
},
},
virtual_machine_profile={
"application_profile": {
"gallery_applications": [{
"package_reference_id": "string",
"configuration_reference": "string",
"enable_automatic_upgrade": False,
"order": 0,
"tags": "string",
"treat_failure_as_deployment_failure": False,
}],
},
"billing_profile": {
"max_price": float(0),
},
"capacity_reservation": {
"capacity_reservation_group": {
"id": "string",
},
},
"diagnostics_profile": {
"boot_diagnostics": {
"enabled": False,
"storage_uri": "string",
},
},
"eviction_policy": "string",
"extension_profile": {
"extensions": [{
"auto_upgrade_minor_version": False,
"enable_automatic_upgrade": False,
"force_update_tag": "string",
"name": "string",
"protected_settings": "any",
"protected_settings_from_key_vault": {
"secret_url": "string",
"source_vault": {
"id": "string",
},
},
"provision_after_extensions": ["string"],
"publisher": "string",
"settings": "any",
"suppress_failures": False,
"type": "string",
"type_handler_version": "string",
}],
"extensions_time_budget": "string",
},
"hardware_profile": {
"vm_size_properties": {
"v_cpus_available": 0,
"v_cpus_per_core": 0,
},
},
"license_type": "string",
"network_profile": {
"health_probe": {
"id": "string",
},
"network_api_version": "string",
"network_interface_configurations": [{
"ip_configurations": [{
"name": "string",
"application_gateway_backend_address_pools": [{
"id": "string",
}],
"application_security_groups": [{
"id": "string",
}],
"load_balancer_backend_address_pools": [{
"id": "string",
}],
"load_balancer_inbound_nat_pools": [{
"id": "string",
}],
"primary": False,
"private_ip_address_version": "string",
"public_ip_address_configuration": {
"name": "string",
"delete_option": "string",
"dns_settings": {
"domain_name_label": "string",
"domain_name_label_scope": "string",
},
"idle_timeout_in_minutes": 0,
"ip_tags": [{
"ip_tag_type": "string",
"tag": "string",
}],
"public_ip_address_version": "string",
"public_ip_prefix": {
"id": "string",
},
"sku": {
"name": "string",
"tier": "string",
},
},
"subnet": {
"id": "string",
},
}],
"name": "string",
"auxiliary_mode": "string",
"auxiliary_sku": "string",
"delete_option": "string",
"disable_tcp_state_tracking": False,
"dns_settings": {
"dns_servers": ["string"],
},
"enable_accelerated_networking": False,
"enable_fpga": False,
"enable_ip_forwarding": False,
"network_security_group": {
"id": "string",
},
"primary": False,
}],
},
"os_profile": {
"admin_password": "string",
"admin_username": "string",
"allow_extension_operations": False,
"computer_name_prefix": "string",
"custom_data": "string",
"linux_configuration": {
"disable_password_authentication": False,
"enable_vm_agent_platform_updates": False,
"patch_settings": {
"assessment_mode": "string",
"automatic_by_platform_settings": {
"bypass_platform_safety_checks_on_user_schedule": False,
"reboot_setting": "string",
},
"patch_mode": "string",
},
"provision_vm_agent": False,
"ssh": {
"public_keys": [{
"key_data": "string",
"path": "string",
}],
},
},
"require_guest_provision_signal": False,
"secrets": [{
"source_vault": {
"id": "string",
},
"vault_certificates": [{
"certificate_store": "string",
"certificate_url": "string",
}],
}],
"windows_configuration": {
"additional_unattend_content": [{
"component_name": azure_native.compute.ComponentName.MICROSOFT_WINDOWS_SHELL_SETUP,
"content": "string",
"pass_name": azure_native.compute.PassName.OOBE_SYSTEM,
"setting_name": azure_native.compute.SettingNames.AUTO_LOGON,
}],
"enable_automatic_updates": False,
"patch_settings": {
"assessment_mode": "string",
"automatic_by_platform_settings": {
"bypass_platform_safety_checks_on_user_schedule": False,
"reboot_setting": "string",
},
"enable_hotpatching": False,
"patch_mode": "string",
},
"provision_vm_agent": False,
"time_zone": "string",
"win_rm": {
"listeners": [{
"certificate_url": "string",
"protocol": azure_native.compute.ProtocolTypes.HTTP,
}],
},
},
},
"priority": "string",
"scheduled_events_profile": {
"os_image_notification_profile": {
"enable": False,
"not_before_timeout": "string",
},
"terminate_notification_profile": {
"enable": False,
"not_before_timeout": "string",
},
},
"security_posture_reference": {
"id": "string",
"exclude_extensions": ["string"],
"is_overridable": False,
},
"security_profile": {
"encryption_at_host": False,
"encryption_identity": {
"user_assigned_identity_resource_id": "string",
},
"proxy_agent_settings": {
"enabled": False,
"imds": {
"in_vm_access_control_profile_reference_id": "string",
"mode": "string",
},
"key_incarnation_id": 0,
"mode": "string",
"wire_server": {
"in_vm_access_control_profile_reference_id": "string",
"mode": "string",
},
},
"security_type": "string",
"uefi_settings": {
"secure_boot_enabled": False,
"v_tpm_enabled": False,
},
},
"service_artifact_reference": {
"id": "string",
},
"storage_profile": {
"data_disks": [{
"create_option": "string",
"lun": 0,
"caching": azure_native.compute.CachingTypes.NONE,
"delete_option": "string",
"disk_iops_read_write": float(0),
"disk_m_bps_read_write": float(0),
"disk_size_gb": 0,
"managed_disk": {
"disk_encryption_set": {
"id": "string",
},
"security_profile": {
"disk_encryption_set": {
"id": "string",
},
"security_encryption_type": "string",
},
"storage_account_type": "string",
},
"name": "string",
"write_accelerator_enabled": False,
}],
"disk_controller_type": "string",
"image_reference": {
"community_gallery_image_id": "string",
"id": "string",
"offer": "string",
"publisher": "string",
"shared_gallery_image_id": "string",
"sku": "string",
"version": "string",
},
"os_disk": {
"create_option": "string",
"caching": azure_native.compute.CachingTypes.NONE,
"delete_option": "string",
"diff_disk_settings": {
"option": "string",
"placement": "string",
},
"disk_size_gb": 0,
"image": {
"uri": "string",
},
"managed_disk": {
"disk_encryption_set": {
"id": "string",
},
"security_profile": {
"disk_encryption_set": {
"id": "string",
},
"security_encryption_type": "string",
},
"storage_account_type": "string",
},
"name": "string",
"os_type": azure_native.compute.OperatingSystemTypes.WINDOWS,
"vhd_containers": ["string"],
"write_accelerator_enabled": False,
},
},
"user_data": "string",
},
do_not_run_extensions_on_overprovisioned_vms=False,
extended_location={
"name": "string",
"type": "string",
},
automatic_repairs_policy={
"enabled": False,
"grace_period": "string",
"repair_action": "string",
},
identity={
"type": azure_native.compute.ResourceIdentityType.SYSTEM_ASSIGNED,
"user_assigned_identities": ["string"],
},
location="string",
orchestration_mode="string",
overprovision=False,
plan={
"name": "string",
"product": "string",
"promotion_code": "string",
"publisher": "string",
},
platform_fault_domain_count=0,
priority_mix_policy={
"base_regular_priority_count": 0,
"regular_priority_percentage_above_base": 0,
},
constrained_maximum_capacity=False,
proximity_placement_group={
"id": "string",
},
host_group={
"id": "string",
},
scale_in_policy={
"force_deletion": False,
"prioritize_unhealthy_vms": False,
"rules": ["string"],
},
scheduled_events_policy={
"scheduled_events_additional_publishing_targets": {
"event_grid_and_resource_graph": {
"enable": False,
},
},
"user_initiated_reboot": {
"automatically_approve": False,
},
"user_initiated_redeploy": {
"automatically_approve": False,
},
},
single_placement_group=False,
sku={
"capacity": float(0),
"name": "string",
"tier": "string",
},
sku_profile={
"allocation_strategy": "string",
"vm_sizes": [{
"name": "string",
"rank": 0,
}],
},
spot_restore_policy={
"enabled": False,
"restore_timeout": "string",
},
tags={
"string": "string",
},
upgrade_policy={
"automatic_os_upgrade_policy": {
"disable_automatic_rollback": False,
"enable_automatic_os_upgrade": False,
"os_rolling_upgrade_deferral": False,
"use_rolling_upgrade_policy": False,
},
"mode": azure_native.compute.UpgradeMode.AUTOMATIC,
"rolling_upgrade_policy": {
"enable_cross_zone_upgrade": False,
"max_batch_instance_percent": 0,
"max_surge": False,
"max_unhealthy_instance_percent": 0,
"max_unhealthy_upgraded_instance_percent": 0,
"pause_time_between_batches": "string",
"prioritize_unhealthy_instances": False,
"rollback_failed_instances_on_policy_breach": False,
},
},
additional_capabilities={
"hibernation_enabled": False,
"ultra_ssd_enabled": False,
},
vm_scale_set_name="string",
zonal_platform_fault_domain_align_mode="string",
zone_balance=False,
zones=["string"])
const virtualMachineScaleSetResource = new azure_native.compute.VirtualMachineScaleSet("virtualMachineScaleSetResource", {
resourceGroupName: "string",
resiliencyPolicy: {
automaticZoneRebalancingPolicy: {
enabled: false,
rebalanceBehavior: "string",
rebalanceStrategy: "string",
},
resilientVMCreationPolicy: {
enabled: false,
},
resilientVMDeletionPolicy: {
enabled: false,
},
},
virtualMachineProfile: {
applicationProfile: {
galleryApplications: [{
packageReferenceId: "string",
configurationReference: "string",
enableAutomaticUpgrade: false,
order: 0,
tags: "string",
treatFailureAsDeploymentFailure: false,
}],
},
billingProfile: {
maxPrice: 0,
},
capacityReservation: {
capacityReservationGroup: {
id: "string",
},
},
diagnosticsProfile: {
bootDiagnostics: {
enabled: false,
storageUri: "string",
},
},
evictionPolicy: "string",
extensionProfile: {
extensions: [{
autoUpgradeMinorVersion: false,
enableAutomaticUpgrade: false,
forceUpdateTag: "string",
name: "string",
protectedSettings: "any",
protectedSettingsFromKeyVault: {
secretUrl: "string",
sourceVault: {
id: "string",
},
},
provisionAfterExtensions: ["string"],
publisher: "string",
settings: "any",
suppressFailures: false,
type: "string",
typeHandlerVersion: "string",
}],
extensionsTimeBudget: "string",
},
hardwareProfile: {
vmSizeProperties: {
vCPUsAvailable: 0,
vCPUsPerCore: 0,
},
},
licenseType: "string",
networkProfile: {
healthProbe: {
id: "string",
},
networkApiVersion: "string",
networkInterfaceConfigurations: [{
ipConfigurations: [{
name: "string",
applicationGatewayBackendAddressPools: [{
id: "string",
}],
applicationSecurityGroups: [{
id: "string",
}],
loadBalancerBackendAddressPools: [{
id: "string",
}],
loadBalancerInboundNatPools: [{
id: "string",
}],
primary: false,
privateIPAddressVersion: "string",
publicIPAddressConfiguration: {
name: "string",
deleteOption: "string",
dnsSettings: {
domainNameLabel: "string",
domainNameLabelScope: "string",
},
idleTimeoutInMinutes: 0,
ipTags: [{
ipTagType: "string",
tag: "string",
}],
publicIPAddressVersion: "string",
publicIPPrefix: {
id: "string",
},
sku: {
name: "string",
tier: "string",
},
},
subnet: {
id: "string",
},
}],
name: "string",
auxiliaryMode: "string",
auxiliarySku: "string",
deleteOption: "string",
disableTcpStateTracking: false,
dnsSettings: {
dnsServers: ["string"],
},
enableAcceleratedNetworking: false,
enableFpga: false,
enableIPForwarding: false,
networkSecurityGroup: {
id: "string",
},
primary: false,
}],
},
osProfile: {
adminPassword: "string",
adminUsername: "string",
allowExtensionOperations: false,
computerNamePrefix: "string",
customData: "string",
linuxConfiguration: {
disablePasswordAuthentication: false,
enableVMAgentPlatformUpdates: false,
patchSettings: {
assessmentMode: "string",
automaticByPlatformSettings: {
bypassPlatformSafetyChecksOnUserSchedule: false,
rebootSetting: "string",
},
patchMode: "string",
},
provisionVMAgent: false,
ssh: {
publicKeys: [{
keyData: "string",
path: "string",
}],
},
},
requireGuestProvisionSignal: false,
secrets: [{
sourceVault: {
id: "string",
},
vaultCertificates: [{
certificateStore: "string",
certificateUrl: "string",
}],
}],
windowsConfiguration: {
additionalUnattendContent: [{
componentName: azure_native.compute.ComponentName.Microsoft_Windows_Shell_Setup,
content: "string",
passName: azure_native.compute.PassName.OobeSystem,
settingName: azure_native.compute.SettingNames.AutoLogon,
}],
enableAutomaticUpdates: false,
patchSettings: {
assessmentMode: "string",
automaticByPlatformSettings: {
bypassPlatformSafetyChecksOnUserSchedule: false,
rebootSetting: "string",
},
enableHotpatching: false,
patchMode: "string",
},
provisionVMAgent: false,
timeZone: "string",
winRM: {
listeners: [{
certificateUrl: "string",
protocol: azure_native.compute.ProtocolTypes.Http,
}],
},
},
},
priority: "string",
scheduledEventsProfile: {
osImageNotificationProfile: {
enable: false,
notBeforeTimeout: "string",
},
terminateNotificationProfile: {
enable: false,
notBeforeTimeout: "string",
},
},
securityPostureReference: {
id: "string",
excludeExtensions: ["string"],
isOverridable: false,
},
securityProfile: {
encryptionAtHost: false,
encryptionIdentity: {
userAssignedIdentityResourceId: "string",
},
proxyAgentSettings: {
enabled: false,
imds: {
inVMAccessControlProfileReferenceId: "string",
mode: "string",
},
keyIncarnationId: 0,
mode: "string",
wireServer: {
inVMAccessControlProfileReferenceId: "string",
mode: "string",
},
},
securityType: "string",
uefiSettings: {
secureBootEnabled: false,
vTpmEnabled: false,
},
},
serviceArtifactReference: {
id: "string",
},
storageProfile: {
dataDisks: [{
createOption: "string",
lun: 0,
caching: azure_native.compute.CachingTypes.None,
deleteOption: "string",
diskIOPSReadWrite: 0,
diskMBpsReadWrite: 0,
diskSizeGB: 0,
managedDisk: {
diskEncryptionSet: {
id: "string",
},
securityProfile: {
diskEncryptionSet: {
id: "string",
},
securityEncryptionType: "string",
},
storageAccountType: "string",
},
name: "string",
writeAcceleratorEnabled: false,
}],
diskControllerType: "string",
imageReference: {
communityGalleryImageId: "string",
id: "string",
offer: "string",
publisher: "string",
sharedGalleryImageId: "string",
sku: "string",
version: "string",
},
osDisk: {
createOption: "string",
caching: azure_native.compute.CachingTypes.None,
deleteOption: "string",
diffDiskSettings: {
option: "string",
placement: "string",
},
diskSizeGB: 0,
image: {
uri: "string",
},
managedDisk: {
diskEncryptionSet: {
id: "string",
},
securityProfile: {
diskEncryptionSet: {
id: "string",
},
securityEncryptionType: "string",
},
storageAccountType: "string",
},
name: "string",
osType: azure_native.compute.OperatingSystemTypes.Windows,
vhdContainers: ["string"],
writeAcceleratorEnabled: false,
},
},
userData: "string",
},
doNotRunExtensionsOnOverprovisionedVMs: false,
extendedLocation: {
name: "string",
type: "string",
},
automaticRepairsPolicy: {
enabled: false,
gracePeriod: "string",
repairAction: "string",
},
identity: {
type: azure_native.compute.ResourceIdentityType.SystemAssigned,
userAssignedIdentities: ["string"],
},
location: "string",
orchestrationMode: "string",
overprovision: false,
plan: {
name: "string",
product: "string",
promotionCode: "string",
publisher: "string",
},
platformFaultDomainCount: 0,
priorityMixPolicy: {
baseRegularPriorityCount: 0,
regularPriorityPercentageAboveBase: 0,
},
constrainedMaximumCapacity: false,
proximityPlacementGroup: {
id: "string",
},
hostGroup: {
id: "string",
},
scaleInPolicy: {
forceDeletion: false,
prioritizeUnhealthyVMs: false,
rules: ["string"],
},
scheduledEventsPolicy: {
scheduledEventsAdditionalPublishingTargets: {
eventGridAndResourceGraph: {
enable: false,
},
},
userInitiatedReboot: {
automaticallyApprove: false,
},
userInitiatedRedeploy: {
automaticallyApprove: false,
},
},
singlePlacementGroup: false,
sku: {
capacity: 0,
name: "string",
tier: "string",
},
skuProfile: {
allocationStrategy: "string",
vmSizes: [{
name: "string",
rank: 0,
}],
},
spotRestorePolicy: {
enabled: false,
restoreTimeout: "string",
},
tags: {
string: "string",
},
upgradePolicy: {
automaticOSUpgradePolicy: {
disableAutomaticRollback: false,
enableAutomaticOSUpgrade: false,
osRollingUpgradeDeferral: false,
useRollingUpgradePolicy: false,
},
mode: azure_native.compute.UpgradeMode.Automatic,
rollingUpgradePolicy: {
enableCrossZoneUpgrade: false,
maxBatchInstancePercent: 0,
maxSurge: false,
maxUnhealthyInstancePercent: 0,
maxUnhealthyUpgradedInstancePercent: 0,
pauseTimeBetweenBatches: "string",
prioritizeUnhealthyInstances: false,
rollbackFailedInstancesOnPolicyBreach: false,
},
},
additionalCapabilities: {
hibernationEnabled: false,
ultraSSDEnabled: false,
},
vmScaleSetName: "string",
zonalPlatformFaultDomainAlignMode: "string",
zoneBalance: false,
zones: ["string"],
});
type: azure-native:compute:VirtualMachineScaleSet
properties:
additionalCapabilities:
hibernationEnabled: false
ultraSSDEnabled: false
automaticRepairsPolicy:
enabled: false
gracePeriod: string
repairAction: string
constrainedMaximumCapacity: false
doNotRunExtensionsOnOverprovisionedVMs: false
extendedLocation:
name: string
type: string
hostGroup:
id: string
identity:
type: SystemAssigned
userAssignedIdentities:
- string
location: string
orchestrationMode: string
overprovision: false
plan:
name: string
product: string
promotionCode: string
publisher: string
platformFaultDomainCount: 0
priorityMixPolicy:
baseRegularPriorityCount: 0
regularPriorityPercentageAboveBase: 0
proximityPlacementGroup:
id: string
resiliencyPolicy:
automaticZoneRebalancingPolicy:
enabled: false
rebalanceBehavior: string
rebalanceStrategy: string
resilientVMCreationPolicy:
enabled: false
resilientVMDeletionPolicy:
enabled: false
resourceGroupName: string
scaleInPolicy:
forceDeletion: false
prioritizeUnhealthyVMs: false
rules:
- string
scheduledEventsPolicy:
scheduledEventsAdditionalPublishingTargets:
eventGridAndResourceGraph:
enable: false
userInitiatedReboot:
automaticallyApprove: false
userInitiatedRedeploy:
automaticallyApprove: false
singlePlacementGroup: false
sku:
capacity: 0
name: string
tier: string
skuProfile:
allocationStrategy: string
vmSizes:
- name: string
rank: 0
spotRestorePolicy:
enabled: false
restoreTimeout: string
tags:
string: string
upgradePolicy:
automaticOSUpgradePolicy:
disableAutomaticRollback: false
enableAutomaticOSUpgrade: false
osRollingUpgradeDeferral: false
useRollingUpgradePolicy: false
mode: Automatic
rollingUpgradePolicy:
enableCrossZoneUpgrade: false
maxBatchInstancePercent: 0
maxSurge: false
maxUnhealthyInstancePercent: 0
maxUnhealthyUpgradedInstancePercent: 0
pauseTimeBetweenBatches: string
prioritizeUnhealthyInstances: false
rollbackFailedInstancesOnPolicyBreach: false
virtualMachineProfile:
applicationProfile:
galleryApplications:
- configurationReference: string
enableAutomaticUpgrade: false
order: 0
packageReferenceId: string
tags: string
treatFailureAsDeploymentFailure: false
billingProfile:
maxPrice: 0
capacityReservation:
capacityReservationGroup:
id: string
diagnosticsProfile:
bootDiagnostics:
enabled: false
storageUri: string
evictionPolicy: string
extensionProfile:
extensions:
- autoUpgradeMinorVersion: false
enableAutomaticUpgrade: false
forceUpdateTag: string
name: string
protectedSettings: any
protectedSettingsFromKeyVault:
secretUrl: string
sourceVault:
id: string
provisionAfterExtensions:
- string
publisher: string
settings: any
suppressFailures: false
type: string
typeHandlerVersion: string
extensionsTimeBudget: string
hardwareProfile:
vmSizeProperties:
vCPUsAvailable: 0
vCPUsPerCore: 0
licenseType: string
networkProfile:
healthProbe:
id: string
networkApiVersion: string
networkInterfaceConfigurations:
- auxiliaryMode: string
auxiliarySku: string
deleteOption: string
disableTcpStateTracking: false
dnsSettings:
dnsServers:
- string
enableAcceleratedNetworking: false
enableFpga: false
enableIPForwarding: false
ipConfigurations:
- applicationGatewayBackendAddressPools:
- id: string
applicationSecurityGroups:
- id: string
loadBalancerBackendAddressPools:
- id: string
loadBalancerInboundNatPools:
- id: string
name: string
primary: false
privateIPAddressVersion: string
publicIPAddressConfiguration:
deleteOption: string
dnsSettings:
domainNameLabel: string
domainNameLabelScope: string
idleTimeoutInMinutes: 0
ipTags:
- ipTagType: string
tag: string
name: string
publicIPAddressVersion: string
publicIPPrefix:
id: string
sku:
name: string
tier: string
subnet:
id: string
name: string
networkSecurityGroup:
id: string
primary: false
osProfile:
adminPassword: string
adminUsername: string
allowExtensionOperations: false
computerNamePrefix: string
customData: string
linuxConfiguration:
disablePasswordAuthentication: false
enableVMAgentPlatformUpdates: false
patchSettings:
assessmentMode: string
automaticByPlatformSettings:
bypassPlatformSafetyChecksOnUserSchedule: false
rebootSetting: string
patchMode: string
provisionVMAgent: false
ssh:
publicKeys:
- keyData: string
path: string
requireGuestProvisionSignal: false
secrets:
- sourceVault:
id: string
vaultCertificates:
- certificateStore: string
certificateUrl: string
windowsConfiguration:
additionalUnattendContent:
- componentName: Microsoft-Windows-Shell-Setup
content: string
passName: OobeSystem
settingName: AutoLogon
enableAutomaticUpdates: false
patchSettings:
assessmentMode: string
automaticByPlatformSettings:
bypassPlatformSafetyChecksOnUserSchedule: false
rebootSetting: string
enableHotpatching: false
patchMode: string
provisionVMAgent: false
timeZone: string
winRM:
listeners:
- certificateUrl: string
protocol: Http
priority: string
scheduledEventsProfile:
osImageNotificationProfile:
enable: false
notBeforeTimeout: string
terminateNotificationProfile:
enable: false
notBeforeTimeout: string
securityPostureReference:
excludeExtensions:
- string
id: string
isOverridable: false
securityProfile:
encryptionAtHost: false
encryptionIdentity:
userAssignedIdentityResourceId: string
proxyAgentSettings:
enabled: false
imds:
inVMAccessControlProfileReferenceId: string
mode: string
keyIncarnationId: 0
mode: string
wireServer:
inVMAccessControlProfileReferenceId: string
mode: string
securityType: string
uefiSettings:
secureBootEnabled: false
vTpmEnabled: false
serviceArtifactReference:
id: string
storageProfile:
dataDisks:
- caching: None
createOption: string
deleteOption: string
diskIOPSReadWrite: 0
diskMBpsReadWrite: 0
diskSizeGB: 0
lun: 0
managedDisk:
diskEncryptionSet:
id: string
securityProfile:
diskEncryptionSet:
id: string
securityEncryptionType: string
storageAccountType: string
name: string
writeAcceleratorEnabled: false
diskControllerType: string
imageReference:
communityGalleryImageId: string
id: string
offer: string
publisher: string
sharedGalleryImageId: string
sku: string
version: string
osDisk:
caching: None
createOption: string
deleteOption: string
diffDiskSettings:
option: string
placement: string
diskSizeGB: 0
image:
uri: string
managedDisk:
diskEncryptionSet:
id: string
securityProfile:
diskEncryptionSet:
id: string
securityEncryptionType: string
storageAccountType: string
name: string
osType: Windows
vhdContainers:
- string
writeAcceleratorEnabled: false
userData: string
vmScaleSetName: string
zonalPlatformFaultDomainAlignMode: string
zoneBalance: false
zones:
- string
VirtualMachineScaleSet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VirtualMachineScaleSet resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Additional
Capabilities Pulumi.Azure Native. Compute. Inputs. Additional Capabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- Automatic
Repairs Pulumi.Policy Azure Native. Compute. Inputs. Automatic Repairs Policy - Policy for automatic repairs.
- Constrained
Maximum boolCapacity - Optional property which must either be set to True or omitted.
- Do
Not boolRun Extensions On Overprovisioned VMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- Extended
Location Pulumi.Azure Native. Compute. Inputs. Extended Location - The extended location of the Virtual Machine Scale Set.
- Host
Group Pulumi.Azure Native. Compute. Inputs. Sub Resource - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- Identity
Pulumi.
Azure Native. Compute. Inputs. Virtual Machine Scale Set Identity - The identity of the virtual machine scale set, if configured.
- Location string
- The geo-location where the resource lives
- Orchestration
Mode string | Pulumi.Azure Native. Compute. Orchestration Mode - Specifies the orchestration mode for the virtual machine scale set.
- Overprovision bool
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- Plan
Pulumi.
Azure Native. Compute. Inputs. Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- Platform
Fault intDomain Count - Fault Domain count for each placement group.
- Priority
Mix Pulumi.Policy Azure Native. Compute. Inputs. Priority Mix Policy - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- Proximity
Placement Pulumi.Group Azure Native. Compute. Inputs. Sub Resource - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- Resiliency
Policy Pulumi.Azure Native. Compute. Inputs. Resiliency Policy - Policy for Resiliency
- Scale
In Pulumi.Policy Azure Native. Compute. Inputs. Scale In Policy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- Scheduled
Events Pulumi.Policy Azure Native. Compute. Inputs. Scheduled Events Policy - The ScheduledEventsPolicy.
- Single
Placement boolGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- Sku
Pulumi.
Azure Native. Compute. Inputs. Sku - The virtual machine scale set sku.
- Sku
Profile Pulumi.Azure Native. Compute. Inputs. Sku Profile - Specifies the sku profile for the virtual machine scale set.
- Spot
Restore Pulumi.Policy Azure Native. Compute. Inputs. Spot Restore Policy - Specifies the Spot Restore properties for the virtual machine scale set.
- Dictionary<string, string>
- Resource tags.
- Upgrade
Policy Pulumi.Azure Native. Compute. Inputs. Upgrade Policy - The upgrade policy.
- Virtual
Machine Pulumi.Profile Azure Native. Compute. Inputs. Virtual Machine Scale Set VMProfile - The virtual machine profile.
- Vm
Scale stringSet Name - The name of the VM scale set.
- Zonal
Platform string | Pulumi.Fault Domain Align Mode Azure Native. Compute. Zonal Platform Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- Zone
Balance bool - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- Zones List<string>
- The availability zones.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Additional
Capabilities AdditionalCapabilities Args - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- Automatic
Repairs AutomaticPolicy Repairs Policy Args - Policy for automatic repairs.
- Constrained
Maximum boolCapacity - Optional property which must either be set to True or omitted.
- Do
Not boolRun Extensions On Overprovisioned VMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- Extended
Location ExtendedLocation Args - The extended location of the Virtual Machine Scale Set.
- Host
Group SubResource Args - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- Identity
Virtual
Machine Scale Set Identity Args - The identity of the virtual machine scale set, if configured.
- Location string
- The geo-location where the resource lives
- Orchestration
Mode string | OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.
- Overprovision bool
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- Plan
Plan
Args - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- Platform
Fault intDomain Count - Fault Domain count for each placement group.
- Priority
Mix PriorityPolicy Mix Policy Args - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- Proximity
Placement SubGroup Resource Args - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- Resiliency
Policy ResiliencyPolicy Args - Policy for Resiliency
- Scale
In ScalePolicy In Policy Args - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- Scheduled
Events ScheduledPolicy Events Policy Args - The ScheduledEventsPolicy.
- Single
Placement boolGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- Sku
Sku
Args - The virtual machine scale set sku.
- Sku
Profile SkuProfile Args - Specifies the sku profile for the virtual machine scale set.
- Spot
Restore SpotPolicy Restore Policy Args - Specifies the Spot Restore properties for the virtual machine scale set.
- map[string]string
- Resource tags.
- Upgrade
Policy UpgradePolicy Args - The upgrade policy.
- Virtual
Machine VirtualProfile Machine Scale Set VMProfile Args - The virtual machine profile.
- Vm
Scale stringSet Name - The name of the VM scale set.
- Zonal
Platform string | ZonalFault Domain Align Mode Platform Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- Zone
Balance bool - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- Zones []string
- The availability zones.
- resource_
group_ stringname - The name of the resource group. The name is case insensitive.
- additional_
capabilities object - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- automatic_
repairs_ objectpolicy - Policy for automatic repairs.
- constrained_
maximum_ boolcapacity - Optional property which must either be set to True or omitted.
- do_
not_ boolrun_ extensions_ on_ overprovisioned_ v_ ms - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- extended_
location object - The extended location of the Virtual Machine Scale Set.
- host_
group object - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- identity object
- The identity of the virtual machine scale set, if configured.
- location string
- The geo-location where the resource lives
- orchestration_
mode string | "Uniform" | "Flexible" - Specifies the orchestration mode for the virtual machine scale set.
- overprovision bool
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- plan object
- Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- platform_
fault_ numberdomain_ count - Fault Domain count for each placement group.
- priority_
mix_ objectpolicy - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- proximity_
placement_ objectgroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- resiliency_
policy object - Policy for Resiliency
- scale_
in_ objectpolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- scheduled_
events_ objectpolicy - The ScheduledEventsPolicy.
- single_
placement_ boolgroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- sku object
- The virtual machine scale set sku.
- sku_
profile object - Specifies the sku profile for the virtual machine scale set.
- spot_
restore_ objectpolicy - Specifies the Spot Restore properties for the virtual machine scale set.
- map(string)
- Resource tags.
- upgrade_
policy object - The upgrade policy.
- virtual_
machine_ objectprofile - The virtual machine profile.
- vm_
scale_ stringset_ name - The name of the VM scale set.
- zonal_
platform_ string | "Aligned" | "Unaligned"fault_ domain_ align_ mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- zone_
balance bool - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- zones list(string)
- The availability zones.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- additional
Capabilities AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- automatic
Repairs AutomaticPolicy Repairs Policy - Policy for automatic repairs.
- constrained
Maximum BooleanCapacity - Optional property which must either be set to True or omitted.
- do
Not BooleanRun Extensions On Overprovisioned VMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- extended
Location ExtendedLocation - The extended location of the Virtual Machine Scale Set.
- host
Group SubResource - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- identity
Virtual
Machine Scale Set Identity - The identity of the virtual machine scale set, if configured.
- location String
- The geo-location where the resource lives
- orchestration
Mode String | OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.
- overprovision Boolean
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- plan Plan
- Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- platform
Fault IntegerDomain Count - Fault Domain count for each placement group.
- priority
Mix PriorityPolicy Mix Policy - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- proximity
Placement SubGroup Resource - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- resiliency
Policy ResiliencyPolicy - Policy for Resiliency
- scale
In ScalePolicy In Policy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- scheduled
Events ScheduledPolicy Events Policy - The ScheduledEventsPolicy.
- single
Placement BooleanGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- sku Sku
- The virtual machine scale set sku.
- sku
Profile SkuProfile - Specifies the sku profile for the virtual machine scale set.
- spot
Restore SpotPolicy Restore Policy - Specifies the Spot Restore properties for the virtual machine scale set.
- Map<String,String>
- Resource tags.
- upgrade
Policy UpgradePolicy - The upgrade policy.
- virtual
Machine VirtualProfile Machine Scale Set VMProfile - The virtual machine profile.
- vm
Scale StringSet Name - The name of the VM scale set.
- zonal
Platform String | ZonalFault Domain Align Mode Platform Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- zone
Balance Boolean - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- zones List<String>
- The availability zones.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- additional
Capabilities AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- automatic
Repairs AutomaticPolicy Repairs Policy - Policy for automatic repairs.
- constrained
Maximum booleanCapacity - Optional property which must either be set to True or omitted.
- do
Not booleanRun Extensions On Overprovisioned VMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- extended
Location ExtendedLocation - The extended location of the Virtual Machine Scale Set.
- host
Group SubResource - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- identity
Virtual
Machine Scale Set Identity - The identity of the virtual machine scale set, if configured.
- location string
- The geo-location where the resource lives
- orchestration
Mode string | OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.
- overprovision boolean
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- plan Plan
- Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- platform
Fault numberDomain Count - Fault Domain count for each placement group.
- priority
Mix PriorityPolicy Mix Policy - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- proximity
Placement SubGroup Resource - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- resiliency
Policy ResiliencyPolicy - Policy for Resiliency
- scale
In ScalePolicy In Policy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- scheduled
Events ScheduledPolicy Events Policy - The ScheduledEventsPolicy.
- single
Placement booleanGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- sku Sku
- The virtual machine scale set sku.
- sku
Profile SkuProfile - Specifies the sku profile for the virtual machine scale set.
- spot
Restore SpotPolicy Restore Policy - Specifies the Spot Restore properties for the virtual machine scale set.
- {[key: string]: string}
- Resource tags.
- upgrade
Policy UpgradePolicy - The upgrade policy.
- virtual
Machine VirtualProfile Machine Scale Set VMProfile - The virtual machine profile.
- vm
Scale stringSet Name - The name of the VM scale set.
- zonal
Platform string | ZonalFault Domain Align Mode Platform Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- zone
Balance boolean - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- zones string[]
- The availability zones.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- additional_
capabilities AdditionalCapabilities Args - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- automatic_
repairs_ Automaticpolicy Repairs Policy Args - Policy for automatic repairs.
- constrained_
maximum_ boolcapacity - Optional property which must either be set to True or omitted.
- do_
not_ boolrun_ extensions_ on_ overprovisioned_ vms - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- extended_
location ExtendedLocation Args - The extended location of the Virtual Machine Scale Set.
- host_
group SubResource Args - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- identity
Virtual
Machine Scale Set Identity Args - The identity of the virtual machine scale set, if configured.
- location str
- The geo-location where the resource lives
- orchestration_
mode str | OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.
- overprovision bool
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- plan
Plan
Args - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- platform_
fault_ intdomain_ count - Fault Domain count for each placement group.
- priority_
mix_ Prioritypolicy Mix Policy Args - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- proximity_
placement_ Subgroup Resource Args - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- resiliency_
policy ResiliencyPolicy Args - Policy for Resiliency
- scale_
in_ Scalepolicy In Policy Args - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- scheduled_
events_ Scheduledpolicy Events Policy Args - The ScheduledEventsPolicy.
- single_
placement_ boolgroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- sku
Sku
Args - The virtual machine scale set sku.
- sku_
profile SkuProfile Args - Specifies the sku profile for the virtual machine scale set.
- spot_
restore_ Spotpolicy Restore Policy Args - Specifies the Spot Restore properties for the virtual machine scale set.
- Mapping[str, str]
- Resource tags.
- upgrade_
policy UpgradePolicy Args - The upgrade policy.
- virtual_
machine_ Virtualprofile Machine Scale Set VMProfile Args - The virtual machine profile.
- vm_
scale_ strset_ name - The name of the VM scale set.
- zonal_
platform_ str | Zonalfault_ domain_ align_ mode Platform Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- zone_
balance bool - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- zones Sequence[str]
- The availability zones.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- additional
Capabilities Property Map - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
- automatic
Repairs Property MapPolicy - Policy for automatic repairs.
- constrained
Maximum BooleanCapacity - Optional property which must either be set to True or omitted.
- do
Not BooleanRun Extensions On Overprovisioned VMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
- extended
Location Property Map - The extended location of the Virtual Machine Scale Set.
- host
Group Property Map - Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
- identity Property Map
- The identity of the virtual machine scale set, if configured.
- location String
- The geo-location where the resource lives
- orchestration
Mode String | "Uniform" | "Flexible" - Specifies the orchestration mode for the virtual machine scale set.
- overprovision Boolean
- Specifies whether the Virtual Machine Scale Set should be overprovisioned.
- plan Property Map
- Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.
- platform
Fault NumberDomain Count - Fault Domain count for each placement group.
- priority
Mix Property MapPolicy - Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
- proximity
Placement Property MapGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
- resiliency
Policy Property Map - Policy for Resiliency
- scale
In Property MapPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
- scheduled
Events Property MapPolicy - The ScheduledEventsPolicy.
- single
Placement BooleanGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
- sku Property Map
- The virtual machine scale set sku.
- sku
Profile Property Map - Specifies the sku profile for the virtual machine scale set.
- spot
Restore Property MapPolicy - Specifies the Spot Restore properties for the virtual machine scale set.
- Map<String>
- Resource tags.
- upgrade
Policy Property Map - The upgrade policy.
- virtual
Machine Property MapProfile - The virtual machine profile.
- vm
Scale StringSet Name - The name of the VM scale set.
- zonal
Platform String | "Aligned" | "Unaligned"Fault Domain Align Mode - Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
- zone
Balance Boolean - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
- zones List<String>
- The availability zones.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualMachineScaleSet resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Etag string
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state, which only appears in the response.
- System
Data Pulumi.Azure Native. Compute. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Time
Created string - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Unique
Id string - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- Azure
Api stringVersion - The Azure API version of the resource.
- Etag string
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state, which only appears in the response.
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Time
Created string - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Unique
Id string - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- azure_
api_ stringversion - The Azure API version of the resource.
- etag string
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioning_
state string - The provisioning state, which only appears in the response.
- system_
data object - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- time_
created string - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- unique_
id string - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- azure
Api StringVersion - The Azure API version of the resource.
- etag String
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - The provisioning state, which only appears in the response.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- time
Created String - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- unique
Id String - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- azure
Api stringVersion - The Azure API version of the resource.
- etag string
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioning
State string - The provisioning state, which only appears in the response.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- time
Created string - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- unique
Id string - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- azure_
api_ strversion - The Azure API version of the resource.
- etag str
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_
state str - The provisioning state, which only appears in the response.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- time_
created str - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- unique_
id str - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
- azure
Api StringVersion - The Azure API version of the resource.
- etag String
- Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - The provisioning state, which only appears in the response.
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- time
Created String - Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- unique
Id String - Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
Supporting Types
AdditionalCapabilities, AdditionalCapabilitiesArgs
Enables or disables a capability on the virtual machine or virtual machine scale set.- Hibernation
Enabled bool - The flag that enables or disables hibernation capability on the VM.
- Ultra
SSDEnabled bool - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- Hibernation
Enabled bool - The flag that enables or disables hibernation capability on the VM.
- Ultra
SSDEnabled bool - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation_
enabled bool - The flag that enables or disables hibernation capability on the VM.
- ultra_
ssd_ boolenabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled Boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled Boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation_
enabled bool - The flag that enables or disables hibernation capability on the VM.
- ultra_
ssd_ boolenabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled Boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled Boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
AdditionalCapabilitiesResponse, AdditionalCapabilitiesResponseArgs
Enables or disables a capability on the virtual machine or virtual machine scale set.- Hibernation
Enabled bool - The flag that enables or disables hibernation capability on the VM.
- Ultra
SSDEnabled bool - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- Hibernation
Enabled bool - The flag that enables or disables hibernation capability on the VM.
- Ultra
SSDEnabled bool - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation_
enabled bool - The flag that enables or disables hibernation capability on the VM.
- ultra_
ssd_ boolenabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled Boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled Boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation_
enabled bool - The flag that enables or disables hibernation capability on the VM.
- ultra_
ssd_ boolenabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
- hibernation
Enabled Boolean - The flag that enables or disables hibernation capability on the VM.
- ultra
SSDEnabled Boolean - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
AdditionalUnattendContent, AdditionalUnattendContentArgs
Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.- Component
Name Pulumi.Azure Native. Compute. Component Name - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- Content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- Pass
Name Pulumi.Azure Native. Compute. Pass Name - The pass name. Currently, the only allowable value is OobeSystem.
- Setting
Name Pulumi.Azure Native. Compute. Setting Names - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- Component
Name ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- Content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- Pass
Name PassName - The pass name. Currently, the only allowable value is OobeSystem.
- Setting
Name SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component_
name "Microsoft-Windows-Shell-Setup" - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass_
name "OobeSystem" - The pass name. Currently, the only allowable value is OobeSystem.
- setting_
name "AutoLogon" | "First Logon Commands" - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content String
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name PassName - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name PassName - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component_
name ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content str
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass_
name PassName - The pass name. Currently, the only allowable value is OobeSystem.
- setting_
name SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name "Microsoft-Windows-Shell-Setup" - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content String
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name "OobeSystem" - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name "AutoLogon" | "First Logon Commands" - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
AdditionalUnattendContentResponse, AdditionalUnattendContentResponseArgs
Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.- Component
Name string - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- Content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- Pass
Name string - The pass name. Currently, the only allowable value is OobeSystem.
- Setting
Name string - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- Component
Name string - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- Content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- Pass
Name string - The pass name. Currently, the only allowable value is OobeSystem.
- Setting
Name string - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component_
name string - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass_
name string - The pass name. Currently, the only allowable value is OobeSystem.
- setting_
name string - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name String - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content String
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name String - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name String - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name string - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content string
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name string - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name string - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component_
name str - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content str
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass_
name str - The pass name. Currently, the only allowable value is OobeSystem.
- setting_
name str - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
- component
Name String - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
- content String
- Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
- pass
Name String - The pass name. Currently, the only allowable value is OobeSystem.
- setting
Name String - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
AllocationStrategy, AllocationStrategyArgs
- Lowest
Price LowestPrice- Capacity
Optimized CapacityOptimized- Prioritized
Prioritized
- Allocation
Strategy Lowest Price LowestPrice- Allocation
Strategy Capacity Optimized CapacityOptimized- Allocation
Strategy Prioritized Prioritized
- "Lowest
Price" LowestPrice- "Capacity
Optimized" CapacityOptimized- "Prioritized"
Prioritized
- Lowest
Price LowestPrice- Capacity
Optimized CapacityOptimized- Prioritized
Prioritized
- Lowest
Price LowestPrice- Capacity
Optimized CapacityOptimized- Prioritized
Prioritized
- LOWEST_PRICE
LowestPrice- CAPACITY_OPTIMIZED
CapacityOptimized- PRIORITIZED
Prioritized
- "Lowest
Price" LowestPrice- "Capacity
Optimized" CapacityOptimized- "Prioritized"
Prioritized
ApiEntityReference, ApiEntityReferenceArgs
The API entity reference.- Id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- Id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id String
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id str
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id String
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
ApiEntityReferenceResponse, ApiEntityReferenceResponseArgs
The API entity reference.- Id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- Id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id String
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id string
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id str
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
- id String
- The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
ApplicationProfile, ApplicationProfileArgs
Contains the list of gallery applications that should be made available to the VM/VMSS- Gallery
Applications List<Pulumi.Azure Native. Compute. Inputs. VMGallery Application> - Specifies the gallery applications that should be made available to the VM/VMSS
- Gallery
Applications []VMGalleryApplication - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery_
applications list(object) - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications List<VMGalleryApplication> - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications VMGalleryApplication[] - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery_
applications Sequence[VMGalleryApplication] - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications List<Property Map> - Specifies the gallery applications that should be made available to the VM/VMSS
ApplicationProfileResponse, ApplicationProfileResponseArgs
Contains the list of gallery applications that should be made available to the VM/VMSS- Gallery
Applications List<Pulumi.Azure Native. Compute. Inputs. VMGallery Application Response> - Specifies the gallery applications that should be made available to the VM/VMSS
- Gallery
Applications []VMGalleryApplication Response - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery_
applications list(object) - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications List<VMGalleryApplication Response> - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications VMGalleryApplication Response[] - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery_
applications Sequence[VMGalleryApplication Response] - Specifies the gallery applications that should be made available to the VM/VMSS
- gallery
Applications List<Property Map> - Specifies the gallery applications that should be made available to the VM/VMSS
AutomaticOSUpgradePolicy, AutomaticOSUpgradePolicyArgs
The configuration parameters used for performing automatic OS upgrade.- Disable
Automatic boolRollback - Whether OS image rollback feature should be disabled. Default value is false.
- Enable
Automatic boolOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- Os
Rolling boolUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- Use
Rolling boolUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- Disable
Automatic boolRollback - Whether OS image rollback feature should be disabled. Default value is false.
- Enable
Automatic boolOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- Os
Rolling boolUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- Use
Rolling boolUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable_
automatic_ boolrollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable_
automatic_ boolos_ upgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os_
rolling_ boolupgrade_ deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use_
rolling_ boolupgrade_ policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic BooleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic BooleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling BooleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling BooleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic booleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic booleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling booleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling booleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable_
automatic_ boolrollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable_
automatic_ boolos_ upgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os_
rolling_ boolupgrade_ deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use_
rolling_ boolupgrade_ policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic BooleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic BooleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling BooleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling BooleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
AutomaticOSUpgradePolicyResponse, AutomaticOSUpgradePolicyResponseArgs
The configuration parameters used for performing automatic OS upgrade.- Disable
Automatic boolRollback - Whether OS image rollback feature should be disabled. Default value is false.
- Enable
Automatic boolOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- Os
Rolling boolUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- Use
Rolling boolUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- Disable
Automatic boolRollback - Whether OS image rollback feature should be disabled. Default value is false.
- Enable
Automatic boolOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- Os
Rolling boolUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- Use
Rolling boolUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable_
automatic_ boolrollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable_
automatic_ boolos_ upgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os_
rolling_ boolupgrade_ deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use_
rolling_ boolupgrade_ policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic BooleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic BooleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling BooleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling BooleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic booleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic booleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling booleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling booleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable_
automatic_ boolrollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable_
automatic_ boolos_ upgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os_
rolling_ boolupgrade_ deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use_
rolling_ boolupgrade_ policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
- disable
Automatic BooleanRollback - Whether OS image rollback feature should be disabled. Default value is false.
- enable
Automatic BooleanOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
- os
Rolling BooleanUpgrade Deferral - Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
- use
Rolling BooleanUpgrade Policy - Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
AutomaticRepairsPolicy, AutomaticRepairsPolicyArgs
Specifies the configuration parameters for automatic repairs on the virtual machine scale set.- Enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- Grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- Repair
Action string | Pulumi.Azure Native. Compute. Repair Action - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- Enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- Grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- Repair
Action string | RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace_
period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair_
action string | "Replace" | "Restart" | "Reimage" - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled Boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period String - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action String | RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action string | RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace_
period str - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair_
action str | RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled Boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period String - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action String | "Replace" | "Restart" | "Reimage" - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
AutomaticRepairsPolicyResponse, AutomaticRepairsPolicyResponseArgs
Specifies the configuration parameters for automatic repairs on the virtual machine scale set.- Enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- Grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- Repair
Action string - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- Enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- Grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- Repair
Action string - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace_
period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair_
action string - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled Boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period String - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action String - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period string - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action string - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled bool
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace_
period str - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair_
action str - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
- enabled Boolean
- Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
- grace
Period String - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
- repair
Action String - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
AutomaticZoneRebalancingPolicy, AutomaticZoneRebalancingPolicyArgs
The configuration parameters used while performing automatic AZ balancing.- Enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- Rebalance
Behavior string | Pulumi.Azure Native. Compute. Rebalance Behavior - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- Rebalance
Strategy string | Pulumi.Azure Native. Compute. Rebalance Strategy - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- Enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- Rebalance
Behavior string | RebalanceBehavior - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- Rebalance
Strategy string | RebalanceStrategy - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance_
behavior string | "CreateBefore Delete" - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance_
strategy string | "Recreate" - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled Boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior String | RebalanceBehavior - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy String | RebalanceStrategy - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior string | RebalanceBehavior - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy string | RebalanceStrategy - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance_
behavior str | RebalanceBehavior - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance_
strategy str | RebalanceStrategy - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled Boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior String | "CreateBefore Delete" - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy String | "Recreate" - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
AutomaticZoneRebalancingPolicyResponse, AutomaticZoneRebalancingPolicyResponseArgs
The configuration parameters used while performing automatic AZ balancing.- Enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- Rebalance
Behavior string - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- Rebalance
Strategy string - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- Enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- Rebalance
Behavior string - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- Rebalance
Strategy string - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance_
behavior string - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance_
strategy string - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled Boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior String - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy String - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior string - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy string - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled bool
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance_
behavior str - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance_
strategy str - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
- enabled Boolean
- Specifies whether Automatic AZ Balancing should be enabled on the virtual machine scale set. The default value is false.
- rebalance
Behavior String - Type of rebalance behavior that will be used for recreating virtual machines in the scale set across availability zones. Default and only supported value for now is CreateBeforeDelete.
- rebalance
Strategy String - Type of rebalance strategy that will be used for rebalancing virtual machines in the scale set across availability zones. Default and only supported value for now is Recreate.
BillingProfile, BillingProfileArgs
Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.- Max
Price double - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- Max
Price float64 - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max_
price number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price Double - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max_
price float - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price Number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
BillingProfileResponse, BillingProfileResponseArgs
Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.- Max
Price double - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- Max
Price float64 - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max_
price number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price Double - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max_
price float - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
- max
Price Number - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. Possible values are: - Any decimal value greater than zero. Example: 0.01538 -1 – indicates default price to be up-to on-demand. You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. Minimum api-version: 2019-03-01.
BootDiagnostics, BootDiagnosticsArgs
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.- Enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- Storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- Enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- Storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage_
uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled Boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri String - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage_
uri str - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled Boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri String - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
BootDiagnosticsResponse, BootDiagnosticsResponseArgs
Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.- Enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- Storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- Enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- Storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage_
uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled Boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri String - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri string - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled bool
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage_
uri str - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
- enabled Boolean
- Whether boot diagnostics should be enabled on the Virtual Machine.
- storage
Uri String - Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
CachingTypes, CachingTypesArgs
- None
None- Read
Only ReadOnly- Read
Write ReadWrite
- Caching
Types None None- Caching
Types Read Only ReadOnly- Caching
Types Read Write ReadWrite
- "None"
None- "Read
Only" ReadOnly- "Read
Write" ReadWrite
- None
None- Read
Only ReadOnly- Read
Write ReadWrite
- None
None- Read
Only ReadOnly- Read
Write ReadWrite
- NONE
None- READ_ONLY
ReadOnly- READ_WRITE
ReadWrite
- "None"
None- "Read
Only" ReadOnly- "Read
Write" ReadWrite
CapacityReservationProfile, CapacityReservationProfileArgs
The parameters of a capacity reservation Profile.- Capacity
Reservation Pulumi.Group Azure Native. Compute. Inputs. Sub Resource - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- Capacity
Reservation SubGroup Resource - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity_
reservation_ objectgroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation SubGroup Resource - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation SubGroup Resource - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity_
reservation_ Subgroup Resource - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation Property MapGroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
CapacityReservationProfileResponse, CapacityReservationProfileResponseArgs
The parameters of a capacity reservation Profile.- Capacity
Reservation Pulumi.Group Azure Native. Compute. Inputs. Sub Resource Response - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- Capacity
Reservation SubGroup Resource Response - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity_
reservation_ objectgroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation SubGroup Resource Response - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation SubGroup Resource Response - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity_
reservation_ Subgroup Resource Response - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
- capacity
Reservation Property MapGroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
ComponentName, ComponentNameArgs
- Microsoft_Windows_Shell_Setup
Microsoft-Windows-Shell-Setup
- Component
Name_Microsoft_Windows_Shell_Setup Microsoft-Windows-Shell-Setup
- "Microsoft-Windows-Shell-Setup"
Microsoft-Windows-Shell-Setup
- Microsoft
Windows Shell Setup Microsoft-Windows-Shell-Setup
- Microsoft_Windows_Shell_Setup
Microsoft-Windows-Shell-Setup
- MICROSOFT_WINDOWS_SHELL_SETUP
Microsoft-Windows-Shell-Setup
- "Microsoft-Windows-Shell-Setup"
Microsoft-Windows-Shell-Setup
DeleteOptions, DeleteOptionsArgs
- Delete
Delete- Detach
Detach
- Delete
Options Delete Delete- Delete
Options Detach Detach
- "Delete"
Delete- "Detach"
Detach
- Delete
Delete- Detach
Detach
- Delete
Delete- Detach
Detach
- DELETE
Delete- DETACH
Detach
- "Delete"
Delete- "Detach"
Detach
DiagnosticsProfile, DiagnosticsProfileArgs
Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.- Boot
Diagnostics Pulumi.Azure Native. Compute. Inputs. Boot Diagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- Boot
Diagnostics BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot_
diagnostics object - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot_
diagnostics BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics Property Map - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
DiagnosticsProfileResponse, DiagnosticsProfileResponseArgs
Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.- Boot
Diagnostics Pulumi.Azure Native. Compute. Inputs. Boot Diagnostics Response - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- Boot
Diagnostics BootDiagnostics Response - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot_
diagnostics object - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics BootDiagnostics Response - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics BootDiagnostics Response - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot_
diagnostics BootDiagnostics Response - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
- boot
Diagnostics Property Map - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
DiffDiskOptions, DiffDiskOptionsArgs
- Local
Local
- Diff
Disk Options Local Local
- "Local"
Local
- Local
Local
- Local
Local
- LOCAL
Local
- "Local"
Local
DiffDiskPlacement, DiffDiskPlacementArgs
- Cache
Disk CacheDisk- Resource
Disk ResourceDisk- Nvme
Disk NvmeDisk
- Diff
Disk Placement Cache Disk CacheDisk- Diff
Disk Placement Resource Disk ResourceDisk- Diff
Disk Placement Nvme Disk NvmeDisk
- "Cache
Disk" CacheDisk- "Resource
Disk" ResourceDisk- "Nvme
Disk" NvmeDisk
- Cache
Disk CacheDisk- Resource
Disk ResourceDisk- Nvme
Disk NvmeDisk
- Cache
Disk CacheDisk- Resource
Disk ResourceDisk- Nvme
Disk NvmeDisk
- CACHE_DISK
CacheDisk- RESOURCE_DISK
ResourceDisk- NVME_DISK
NvmeDisk
- "Cache
Disk" CacheDisk- "Resource
Disk" ResourceDisk- "Nvme
Disk" NvmeDisk
DiffDiskSettings, DiffDiskSettingsArgs
Describes the parameters of ephemeral disk settings that can be specified for operating system disk. Note: The ephemeral disk settings can only be specified for managed disk.- Option
string | Pulumi.
Azure Native. Compute. Diff Disk Options - Specifies the ephemeral disk settings for operating system disk.
- Placement
string | Pulumi.
Azure Native. Compute. Diff Disk Placement - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- Option
string | Diff
Disk Options - Specifies the ephemeral disk settings for operating system disk.
- Placement
string | Diff
Disk Placement - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option string | "Local"
- Specifies the ephemeral disk settings for operating system disk.
- placement
string | "Cache
Disk" | "Resource Disk" | "Nvme Disk" - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option
String | Diff
Disk Options - Specifies the ephemeral disk settings for operating system disk.
- placement
String | Diff
Disk Placement - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option
string | Diff
Disk Options - Specifies the ephemeral disk settings for operating system disk.
- placement
string | Diff
Disk Placement - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option
str | Diff
Disk Options - Specifies the ephemeral disk settings for operating system disk.
- placement
str | Diff
Disk Placement - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option String | "Local"
- Specifies the ephemeral disk settings for operating system disk.
- placement
String | "Cache
Disk" | "Resource Disk" | "Nvme Disk" - Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
DiffDiskSettingsResponse, DiffDiskSettingsResponseArgs
Describes the parameters of ephemeral disk settings that can be specified for operating system disk. Note: The ephemeral disk settings can only be specified for managed disk.- Option string
- Specifies the ephemeral disk settings for operating system disk.
- Placement string
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- Option string
- Specifies the ephemeral disk settings for operating system disk.
- Placement string
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option string
- Specifies the ephemeral disk settings for operating system disk.
- placement string
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option String
- Specifies the ephemeral disk settings for operating system disk.
- placement String
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option string
- Specifies the ephemeral disk settings for operating system disk.
- placement string
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option str
- Specifies the ephemeral disk settings for operating system disk.
- placement str
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
- option String
- Specifies the ephemeral disk settings for operating system disk.
- placement String
- Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version for NvmeDisk: 2024-03-01.
DiskControllerTypes, DiskControllerTypesArgs
- SCSI
SCSI- NVMe
NVMe
- Disk
Controller Types SCSI SCSI- Disk
Controller Types NVMe NVMe
- "SCSI"
SCSI- "NVMe"
NVMe
- SCSI
SCSI- NVMe
NVMe
- SCSI
SCSI- NVMe
NVMe
- SCSI
SCSI- NV_ME
NVMe
- "SCSI"
SCSI- "NVMe"
NVMe
DiskCreateOptionTypes, DiskCreateOptionTypesArgs
- From
Image FromImage- Empty
Empty- Attach
Attach- Copy
Copy- Restore
Restore
- Disk
Create Option Types From Image FromImage- Disk
Create Option Types Empty Empty- Disk
Create Option Types Attach Attach- Disk
Create Option Types Copy Copy- Disk
Create Option Types Restore Restore
- "From
Image" FromImage- "Empty"
Empty- "Attach"
Attach- "Copy"
Copy- "Restore"
Restore
- From
Image FromImage- Empty
Empty- Attach
Attach- Copy
Copy- Restore
Restore
- From
Image FromImage- Empty
Empty- Attach
Attach- Copy
Copy- Restore
Restore
- FROM_IMAGE
FromImage- EMPTY
Empty- ATTACH
Attach- COPY
Copy- RESTORE
Restore
- "From
Image" FromImage- "Empty"
Empty- "Attach"
Attach- "Copy"
Copy- "Restore"
Restore
DiskDeleteOptionTypes, DiskDeleteOptionTypesArgs
- Delete
Delete- Detach
Detach
- Disk
Delete Option Types Delete Delete- Disk
Delete Option Types Detach Detach
- "Delete"
Delete- "Detach"
Detach
- Delete
Delete- Detach
Detach
- Delete
Delete- Detach
Detach
- DELETE
Delete- DETACH
Detach
- "Delete"
Delete- "Detach"
Detach
DiskEncryptionSetParameters, DiskEncryptionSetParametersArgs
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.- Id string
- Resource Id
- Id string
- Resource Id
- id string
- Resource Id
- id String
- Resource Id
- id string
- Resource Id
- id str
- Resource Id
- id String
- Resource Id
DiskEncryptionSetParametersResponse, DiskEncryptionSetParametersResponseArgs
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.- Id string
- Resource Id
- Id string
- Resource Id
- id string
- Resource Id
- id String
- Resource Id
- id string
- Resource Id
- id str
- Resource Id
- id String
- Resource Id
DomainNameLabelScopeTypes, DomainNameLabelScopeTypesArgs
- Tenant
Reuse TenantReuse- Subscription
Reuse SubscriptionReuse- Resource
Group Reuse ResourceGroupReuse- No
Reuse NoReuse
- Domain
Name Label Scope Types Tenant Reuse TenantReuse- Domain
Name Label Scope Types Subscription Reuse SubscriptionReuse- Domain
Name Label Scope Types Resource Group Reuse ResourceGroupReuse- Domain
Name Label Scope Types No Reuse NoReuse
- "Tenant
Reuse" TenantReuse- "Subscription
Reuse" SubscriptionReuse- "Resource
Group Reuse" ResourceGroupReuse- "No
Reuse" NoReuse
- Tenant
Reuse TenantReuse- Subscription
Reuse SubscriptionReuse- Resource
Group Reuse ResourceGroupReuse- No
Reuse NoReuse
- Tenant
Reuse TenantReuse- Subscription
Reuse SubscriptionReuse- Resource
Group Reuse ResourceGroupReuse- No
Reuse NoReuse
- TENANT_REUSE
TenantReuse- SUBSCRIPTION_REUSE
SubscriptionReuse- RESOURCE_GROUP_REUSE
ResourceGroupReuse- NO_REUSE
NoReuse
- "Tenant
Reuse" TenantReuse- "Subscription
Reuse" SubscriptionReuse- "Resource
Group Reuse" ResourceGroupReuse- "No
Reuse" NoReuse
EncryptionIdentity, EncryptionIdentityArgs
Specifies the Managed Identity used by ADE to get access token for keyvault operations.- User
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- User
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user_
assigned_ stringidentity_ resource_ id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned StringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user_
assigned_ stridentity_ resource_ id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned StringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
EncryptionIdentityResponse, EncryptionIdentityResponseArgs
Specifies the Managed Identity used by ADE to get access token for keyvault operations.- User
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- User
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user_
assigned_ stringidentity_ resource_ id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned StringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned stringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user_
assigned_ stridentity_ resource_ id - Specifies ARM Resource ID of one of the user identities associated with the VM.
- user
Assigned StringIdentity Resource Id - Specifies ARM Resource ID of one of the user identities associated with the VM.
EventGridAndResourceGraph, EventGridAndResourceGraphArgs
Specifies eventGridAndResourceGraph related Scheduled Event related configurations.- Enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- Enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable Boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable Boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
EventGridAndResourceGraphResponse, EventGridAndResourceGraphResponseArgs
Specifies eventGridAndResourceGraph related Scheduled Event related configurations.- Enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- Enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable Boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable bool
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
- enable Boolean
- Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
ExtendedLocation, ExtendedLocationArgs
The complex type of the extended location.- Name string
- The name of the extended location.
- Type
string | Pulumi.
Azure Native. Compute. Extended Location Types - The type of the extended location.
- Name string
- The name of the extended location.
- Type
string | Extended
Location Types - The type of the extended location.
- name string
- The name of the extended location.
- type
string | "Edge
Zone" - The type of the extended location.
- name String
- The name of the extended location.
- type
String | Extended
Location Types - The type of the extended location.
- name string
- The name of the extended location.
- type
string | Extended
Location Types - The type of the extended location.
- name str
- The name of the extended location.
- type
str | Extended
Location Types - The type of the extended location.
- name String
- The name of the extended location.
- type
String | "Edge
Zone" - The type of the extended location.
ExtendedLocationResponse, ExtendedLocationResponseArgs
The complex type of the extended location.ExtendedLocationTypes, ExtendedLocationTypesArgs
- Edge
Zone EdgeZone
- Extended
Location Types Edge Zone EdgeZone
- "Edge
Zone" EdgeZone
- Edge
Zone EdgeZone
- Edge
Zone EdgeZone
- EDGE_ZONE
EdgeZone
- "Edge
Zone" EdgeZone
HostEndpointSettings, HostEndpointSettingsArgs
Specifies particular host endpoint settings.- In
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- Mode
string | Pulumi.
Azure Native. Compute. Modes - Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- In
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- Mode string | Modes
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in_
vm_ stringaccess_ control_ profile_ reference_ id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode string | "Audit" | "Enforce" | "Disabled"
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess StringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode String | Modes
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode string | Modes
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in_
vm_ straccess_ control_ profile_ reference_ id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode str | Modes
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess StringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode String | "Audit" | "Enforce" | "Disabled"
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
HostEndpointSettingsResponse, HostEndpointSettingsResponseArgs
Specifies particular host endpoint settings.- In
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- Mode string
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- In
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- Mode string
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in_
vm_ stringaccess_ control_ profile_ reference_ id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode string
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess StringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode String
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess stringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode string
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in_
vm_ straccess_ control_ profile_ reference_ id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode str
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
- in
VMAccess StringControl Profile Reference Id - Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}
- mode String
- Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation.
IPVersion, IPVersionArgs
- IPv4
IPv4- IPv6
IPv6
- IPVersion
IPv4 IPv4- IPVersion
IPv6 IPv6
- "IPv4"
IPv4- "IPv6"
IPv6
- IPv4
IPv4- IPv6
IPv6
- IPv4
IPv4- IPv6
IPv6
- I_PV4
IPv4- I_PV6
IPv6
- "IPv4"
IPv4- "IPv6"
IPv6
ImageReference, ImageReferenceArgs
Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.- Community
Gallery stringImage Id - Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.
- Id string
- Resource Id
- Offer string
- Specifies the offer of the platform image or marketplace image used to create the virtual machine.
- Publisher string
- The image publisher.
- string
- Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
- Sku string
- The image SKU.
- Version string
- Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.
- Community
Gallery stringImage Id - Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.
- Id string
- Resource Id
- Offer string
- Specifies the offer of the platform image or marketplace image used to create the virtual machine.
- Publisher string
- The image publisher.
- string
- Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
- Sku string
- The image SKU.
- Version string
- Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.
- community_
gallery_ stringimage_ id - Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.
- id string
- Resource Id
- offer string
- Specifies the offer of the platform image or marketplace image used to create the virtual machine.
- publisher string
- The image publisher.
- string
- Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
- sku string
- The image SKU.
- version string
- Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.
- community
Gallery StringImage Id - Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.
- id String
- Resource Id
- offer String
- Specifies the offer of the platform image or marketplace image used to create the virtual machine.
- publisher String
- The image publisher.
- String
- Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
- sku String
- The image SKU.
- version String
- Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.
- community
Gallery stringImage Id - Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.
- id string
- Resource Id
- offer string
- Specifies the offer of the platform image or marketplace image used to create the virtual machine.