azurermOrchestratedVirtualMachineScaleSet
Manages an Orchestrated Virtual Machine Scale Set.
Disclaimers
-> NOTE: As of the v2.86.0 (November 19, 2021) release of the provider this resource will only create Virtual Machine Scale Sets with the Flexible Orchestration Mode.
-> NOTE: All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermOrchestratedVirtualMachineScaleSetExample =
new azurerm.orchestratedVirtualMachineScaleSet.OrchestratedVirtualMachineScaleSet(
this,
"example_1",
{
location: azurermResourceGroupExample.location,
name: "example-VMSS",
platform_fault_domain_count: 1,
resource_group_name: azurermResourceGroupExample.name,
zones: ["1"],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermOrchestratedVirtualMachineScaleSetExample.overrideLogicalId("example");
Argument Reference
-
name
- (Required) The name of the Orchestrated Virtual Machine Scale Set. Changing this forces a new resource to be created. -
location
- (Required) The Azure location where the Orchestrated Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the Resource Group in which the Orchestrated Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. -
platformFaultDomainCount
- (Required) Specifies the number of fault domains that are used by this Orchestrated Virtual Machine Scale Set. Changing this forces a new resource to be created.
-> NOTE: The number of Fault Domains varies depending on which Azure Region you're using - a list can be found here.
-
skuName
- (Optional) Thename
of the SKU to be used by this Orcestrated Virtual Machine Scale Set. Valid values include: any of the General purpose, Compute optimized, Memory optimized, Storage optimized, GPU optimized, FPGA optimized, High performance, or Previous generation virtual machine SKUs. -
additionalCapabilities
- (Optional) AnadditionalCapabilities
block as defined below. -
encryptionAtHostEnabled
- (Optional) Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host? -
instances
- (Optional) The number of Virtual Machines in the Orcestrated Virtual Machine Scale Set. -
networkInterface
- (Optional) One or morenetworkInterface
blocks as defined below. -
osProfile
- (Optional) AnosProfile
block as defined below. -
osDisk
- (Optional) AnosDisk
block as defined below. -
automaticInstanceRepair
- (Optional) AnautomaticInstanceRepair
block as defined below.
-> NOTE: To enable the automaticInstanceRepair
, the Orchestrated Virtual Machine Scale Set must have a valid healthProbeId
or an Application Health Extension.
-
bootDiagnostics
- (Optional) AbootDiagnostics
block as defined below. -
capacityReservationGroupId
- (Optional) Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created.
-> NOTE: capacityReservationGroupId
cannot be specified with proximityPlacementGroupId
-> NOTE: If capacityReservationGroupId
is specified the singlePlacementGroup
must be set to false
.
-
dataDisk
- (Optional) One or moredataDisk
blocks as defined below. -
extension
- (Optional) One or moreextension
blocks as defined below -
extensionOperationsEnabled
- (Optional) Should extension operations be allowed on the Virtual Machine Scale Set? Possible values aretrue
orfalse
. Defaults totrue
. Changing this forces a new Orchestrated Virtual Machine Scale Set to be created.
-> NOTE: extensionOperationsEnabled
may only be set to false
if there are no extensions defined in the extension
field.
-
extensionsTimeBudget
- (Optional) Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). -
evictionPolicy
- (Optional) The Policy which should be used Virtual Machines are Evicted from the Scale Set. Possible values aredeallocate
anddelete
. Changing this forces a new resource to be created. -
identity
- (Optional) Anidentity
block as defined below. -
licenseType
- (Optional) Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Orchestrated Virtual Machine Scale Set. Possible values arenone
,windowsClient
andwindowsServer
. -
maxBidPrice
- (Optional) The maximum price you're willing to pay for each Orchestrated Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to1
, which means that each Virtual Machine in the Orchestrated Scale Set should not be evicted for price reasons. -
plan
- (Optional) Aplan
block as documented below. Changing this forces a new resource to be created. -
priority
- (Optional) The Priority of this Orchestrated Virtual Machine Scale Set. Possible values areregular
andspot
. Defaults toregular
. Changing this value forces a new resource. -
singlePlacementGroup
- (Optional) Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values aretrue
orfalse
.
-> NOTE: singlePlacementGroup
behaves differently for Orchestrated Virtual Machine Scale Sets than it does for other Virtual Machine Scale Sets. If you do not define the singlePlacementGroup
field in your configuration file the service will determin what this value should be based off of the value contained within the skuName
field of your configuration file. You may set the singlePlacementGroup
field to true
, however once you set it to false
you will not be able to revert it back to true
. If you wish to use Specialty Sku virtual machines (e.g. M-Seiries virtual machines) you will need to contact you Microsoft support professional and request to be added to the include list since this feature is currently in private preview until the end of September 2022. Once you have been added to the private preview include list you will need to run the following command to register your subscription with the feature: azFeatureRegisterNamespaceMicrosoftComputeNameSpecialSkusForVmssFlex
. If you are not on the include list this command will error out with the following error message (featureRegistrationUnsupported)TheFeature 'specialSkusForVmssFlex'DoesNotSupportRegistration
.
-
sourceImageId
- (Optional) The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types includeimageId
s,sharedImageId
s,sharedImageVersionId
s,communityGalleryImageId
s,communityGalleryImageVersionId
s,sharedGalleryImageId
s andsharedGalleryImageVersionId
s. -
sourceImageReference
- (Optional) AsourceImageReference
block as defined below. -
terminationNotification
- (Optional) AterminationNotification
block as defined below. -
userDataBase64
- (Optional) The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set. -
proximityPlacementGroupId
- (Optional) The ID of the Proximity Placement Group which the Orchestrated Virtual Machine should be assigned to. Changing this forces a new resource to be created. -
zoneBalance
- (Optional) Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults tofalse
. Changing this forces a new resource to be created.
-> NOTE: This can only be set to true
when one or more zones
are configured.
zones
- (Optional) Specifies a list of Availability Zones in which this Orchestrated Virtual Machine should be located. Changing this forces a new Orchestrated Virtual Machine to be created.
-> NOTE: Due to a limitation of the Azure API at this time only one Availability Zone can be defined.
-
tags
- (Optional) A mapping of tags which should be assigned to this Orchestrated Virtual Machine Scale Set. -
priorityMix
- (Optional) apriorityMix
block as defined below
An additionalCapabilities
block supports the following:
ultraSsdEnabled
- (Optional) Should the capacity to enable Data Disks of theultraSsdLrs
storage account type be supported on this Orchestrated Virtual Machine Scale Set? Defaults tofalse
. Changing this forces a new resource to be created.
An osProfile
block supports the following:
customData
- (Optional) The Base64-Encoded Custom Data which should be used for this Orchestrated Virtual Machine Scale Set.
-> NOTE: When Custom Data has been configured, it's not possible to remove it without tainting the Orchestrated Virtual Machine Scale Set, due to a limitation of the Azure API.
-
windowsConfiguration
- (Optional) AwindowsConfiguration
block as documented below. -
linuxConfiguration
- (Optional) AlinuxConfiguration
block as documented below.
A windowsConfiguration
block supports the following:
-
adminUsername
- (Required) The username of the local administrator on each Orchestrated Virtual Machine Scale Set instance. Changing this forces a new resource to be created. -
adminPassword
- (Required) The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. -
computerNamePrefix
- (Optional) The prefix which should be used for the name of the Virtual Machines in this Scale Set. If unspecified this defaults to the value for thename
field. If the value of thename
field is not a validcomputerNamePrefix
, then you must specifycomputerNamePrefix
. Changing this forces a new resource to be created. -
enableAutomaticUpdates
- (Optional) Are automatic updates enabled for this Virtual Machine? Defaults totrue
. -
hotpatchingEnabled
- (Optional) Should the VM be patched without requiring a reboot? Possible values aretrue
orfalse
. Defaults tofalse
. For more information about hot patching please see the product documentation.
-> NOTE: Hotpatching can only be enabled if the patchMode
is set to automaticByPlatform
, the provisionVmAgent
is set to true
, your sourceImageReference
references a hotpatching enabled image, the VM's skuName
is set to a Azure generation 2 VM SKU and the extension
contains an application health extension. An example of how to correctly configure a Orchestrated Virtual Machine Scale Set to provision a Windows Virtual Machine with hotpatching enabled can be found in the /examples/orchestratedVmScaleSet/hotpatchingEnabled
directory within the GitHub Repository.
patchAssessmentMode
- (Optional) Specifies the mode of VM Guest Patching for the virtual machines that are associated to the Orchestrated Virtual Machine Scale Set. Possible values areautomaticByPlatform
orimageDefault
. Defaults toimageDefault
.
-> NOTE: If the patchAssessmentMode
is set to automaticByPlatform
then the provisionVmAgent
field must be set to true
.
patchMode
- (Optional) Specifies the mode of in-guest patching of this Windows Virtual Machine. Possible values aremanual
,automaticByOs
andautomaticByPlatform
. Defaults toautomaticByOs
. For more information on patch modes please see the product documentation.
-> NOTE: If patchMode
is set to automaticByPlatform
the provisionVmAgent
must be set to true
and the extension
must contain at least one application health extension.
-
provisionVmAgent
- (Optional) Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults totrue
. Changing this value forces a new resource to be created. -
secret
- (Optional) One or moresecret
blocks as defined below. -
timezone
- (Optional) Specifies the time zone of the virtual machine, the possible values are defined here. -
winrmListener
- (Optional) One or morewinrmListener
blocks as defined below. Changing this forces a new resource to be created.
A linuxConfiguration
block supports the following:
-
adminUsername
- (Required) The username of the local administrator on each Orchestrated Virtual Machine Scale Set instance. Changing this forces a new resource to be created. -
adminPassword
- (Optional) The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. -
adminSshKey
- (Optional) AadminSshKey
block as documented below. -
computerNamePrefix
- (Optional) The prefix which should be used for the name of the Virtual Machines in this Scale Set. If unspecified this defaults to the value for the name field. If the value of the name field is not a validcomputerNamePrefix
, then you must specifycomputerNamePrefix
. Changing this forces a new resource to be created. -
disablePasswordAuthentication
- (Optional) When anadminPassword
is specifieddisablePasswordAuthentication
must be set tofalse
. Defaults totrue
.
-> NOTE: Either adminPassword
or adminSshKey
must be specified.
patchAssessmentMode
- (Optional) Specifies the mode of VM Guest Patching for the virtual machines that are associated to the Orchestrated Virtual Machine Scale Set. Possible values areautomaticByPlatform
orimageDefault
. Defaults toimageDefault
.
-> NOTE: If the patchAssessmentMode
is set to automaticByPlatform
then the provisionVmAgent
field must be set to true
.
patchMode
- (Optional) Specifies the mode of in-guest patching of this Windows Virtual Machine. Possible values areimageDefault
orautomaticByPlatform
. Defaults toimageDefault
. For more information on patch modes please see the product documentation.
-> NOTE: If patchMode
is set to automaticByPlatform
the provisionVmAgent
must be set to true
and the extension
must contain at least one application health extension. An example of how to correctly configure a Orchestrated Virtual Machine Scale Set to provision a Linux Virtual Machine with Automatic VM Guest Patching enabled can be found in the /examples/orchestratedVmScaleSet/automaticVmGuestPatching
directory within the GitHub Repository.
-
provisionVmAgent
- (Optional) Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults totrue
. Changing this value forces a new resource to be created. -
secret
- (Optional) One or moresecret
blocks as defined below.
A secret
block supports the following:
-
keyVaultId
- (Required) The ID of the Key Vault from which all Secrets should be sourced. -
certificate
- (Required) One or morecertificate
blocks as defined below.
-> NOTE: The schema of the certificate
block is slightly different depending on if you are provisioning a windowsConfiguration
or a linuxConfiguration
.
A (Windows) certificate
block supports the following:
-
store
- (Required) The certificate store on the Virtual Machine where the certificate should be added. -
url
- (Required) The Secret URL of a Key Vault Certificate.
A (Linux) certificate
block supports the following:
url
- (Required) The Secret URL of a Key Vault Certificate.
An adminSshKey
block supports the following:
-
publicKey
- (Required) The Public Key which should be used for authentication, which needs to be at least 2048-bit and in ssh-rsa format. -
username
- (Required) The Username for which this Public SSH Key should be configured.
-> NOTE: The Azure VM Agent only allows creating SSH Keys at the path /home/{username}/Ssh/authorizedKeys
- as such this public key will be written to the authorized keys file.
A winrmListener
block supports the following:
-
protocol
- (Required) Specifies the protocol of listener. Possible values arehttp
orhttps
. Changing this forces a new resource to be created. -
certificateUrl
- (Optional) The Secret URL of a Key Vault Certificate, which must be specified when protocol is set tohttps
. Changing this forces a new resource to be created.
-> NOTE: This can be sourced from the secretId
field within the azurermKeyVaultCertificate
Resource.
An automaticInstanceRepair
block supports the following:
-
enabled
- (Required) Should the automatic instance repair be enabled on this Orchestrated Virtual Machine Scale Set? Possible values aretrue
andfalse
. -
gracePeriod
- (Optional) Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between30
and90
minutes. Defaults to30
minutes. The time duration should be specified iniso8601
format (e.g.pt30M
topt90M
).
A bootDiagnostics
block supports the following:
storageAccountUri
- (Optional) The Primary/Secondary Endpoint for the Azure Storage Account which should be used to store Boot Diagnostics, including Console Output and Screenshots from the Hypervisor. By including abootDiagnostics
block without passing thestorageAccountUri
field will cause the API to utilize a Managed Storage Account to store the Boot Diagnostics output.
A certificate
block supports the following:
-
store
- (Required) The certificate store on the Virtual Machine where the certificate should be added. -
url
- (Required) The Secret URL of a Key Vault Certificate.
-> NOTE: This can be sourced from the secretId
field within the azurermKeyVaultCertificate
Resource.
A diffDiskSettings
block supports the following:
-
option
- (Required) Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value islocal
. Changing this forces a new resource to be created. -
placement
- (Optional) Specifies where to store the Ephemeral Disk. Possible values arecacheDisk
andresourceDisk
. Defaults tocacheDisk
. Changing this forces a new resource to be created.
A dataDisk
block supports the following:
-
caching
- (Required) The type of Caching which should be used for this Data Disk. Possible values are None, ReadOnly and ReadWrite. -
createOption
- (Optional) The create option which should be used for this Data Disk. Possible values are Empty and FromImage. Defaults toempty
. (FromImage should only be used if the source image includes data disks). -
diskSizeGb
- (Required) The size of the Data Disk which should be created. -
lun
- (Required) The Logical Unit Number of the Data Disk, which must be unique within the Virtual Machine. -
storageAccountType
- (Required) The Type of Storage Account which should back this Data Disk. Possible values includestandardLrs
,standardSsdLrs
,standardSsdZrs
,premiumLrs
,premiumV2Lrs
,premiumZrs
andultraSsdLrs
. -
diskEncryptionSetId
- (Optional) The ID of the Disk Encryption Set which should be used to encrypt the Data Disk. Changing this forces a new resource to be created. -
ultraSsdDiskIopsReadWrite
- (Optional) Specifies the Read-Write IOPS for this Data Disk. Only settable for UltraSSD disks. -
ultraSsdDiskMbpsReadWrite
- (Optional) Specifies the bandwidth in MB per second for this Data Disk. Only settable for UltraSSD disks. -
writeAcceleratorEnabled
- (Optional) Specifies if Write Accelerator is enabled on the Data Disk. Defaults tofalse
.
An extension
block supports the following:
-
name
- (Required) The name for the Virtual Machine Scale Set Extension. -
publisher
- (Required) Specifies the Publisher of the Extension. -
type
- (Required) Specifies the Type of the Extension. -
typeHandlerVersion
- (Required) Specifies the version of the extension to use, available versions can be found using the Azure CLI. -
autoUpgradeMinorVersionEnabled
- (Optional) Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults totrue
. -
extensionsToProvisionAfterVmCreation
- (Optional) An ordered list of Extension names which Orchestrated Virtual Machine Scale Set should provision after VM creation. -
forceExtensionExecutionOnChange
- (Optional) A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. -
protectedSettings
- (Optional) A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension.
-> NOTE: Keys within the protectedSettings
block are notoriously case-sensitive, where the casing required (e.g. titleCase
vs snakeCase
) depends on the Extension being used. Please refer to the documentation for the specific Orchestrated Virtual Machine Extension you're looking to use for more information.
protectedSettingsFromKeyVault
- (Optional) AprotectedSettingsFromKeyVault
block as defined below.
\~> Note: protectedSettingsFromKeyVault
cannot be used with protectedSettings
failureSuppressionEnabled
- (Optional) Should failures from the extension be suppressed? Possible values aretrue
orfalse
.
-> NOTE: Operational failures such as not connecting to the VM will not be suppressed regardless of the failureSuppressionEnabled
value.
settings
- (Optional) A JSON String which specifies Settings for the Extension.
An ipConfiguration
block supports the following:
-
name
- (Required) The Name which should be used for this IP Configuration. -
applicationGatewayBackendAddressPoolIds
- (Optional) A list of Backend Address Pools IDs from a Application Gateway which this Orchestrated Virtual Machine Scale Set should be connected to. -
applicationSecurityGroupIds
- (Optional) A list of Application Security Group IDs which this Orchestrated Virtual Machine Scale Set should be connected to. -
loadBalancerBackendAddressPoolIds
- (Optional) A list of Backend Address Pools IDs from a Load Balancer which this Orchestrated Virtual Machine Scale Set should be connected to.
-> NOTE: When using this field you'll also need to configure a Rule for the Load Balancer, and use a depends_on between this resource and the Load Balancer Rule.
primary
- (Optional) Is this the Primary IP Configuration for this Network Interface? Possible values aretrue
andfalse
. Defaults tofalse
.
-> NOTE: One ipConfiguration
block must be marked as Primary for each Network Interface.
-
publicIpAddress
- (Optional) ApublicIpAddress
block as defined below. -
subnetId
- (Optional) The ID of the Subnet which this IP Configuration should be connected to.
-> NOTE: subnetId
is required if version is set to iPv4
.
version
- (Optional) The Internet Protocol Version which should be used for this IP Configuration. Possible values areiPv4
andiPv6
. Defaults toiPv4
.
An ipTag
block supports the following:
-
tag
- (Required) The IP Tag associated with the Public IP, such assql
orstorage
. Changing this forces a new resource to be created. -
type
- (Required) The Type of IP Tag, such asfirstPartyUsage
. Changing this forces a new resource to be created.
A networkInterface
block supports the following:
-
name
- (Required) The Name which should be used for this Network Interface. Changing this forces a new resource to be created. -
ipConfiguration
- (Required) One or moreipConfiguration
blocks as defined above. -
dnsServers
- (Optional) A list of IP Addresses of DNS Servers which should be assigned to the Network Interface. -
enableAcceleratedNetworking
- (Optional) Does this Network Interface support Accelerated Networking? Possible values aretrue
andfalse
. Defaults tofalse
. -
enableIpForwarding
- (Optional) Does this Network Interface support IP Forwarding? Possible values aretrue
andfalse
. Defaults tofalse
. -
networkSecurityGroupId
- (Optional) The ID of a Network Security Group which should be assigned to this Network Interface. -
primary
- (Optional) Is this the Primary IP Configuration? Possible values aretrue
andfalse
. Defaults tofalse
.
-> NOTE: If multiple networkInterface
blocks are specified, one must be set to primary
.
An osDisk
block supports the following:
-
caching
- (Required) The Type of Caching which should be used for the Internal OS Disk. Possible values arenone
,readOnly
andreadWrite
. -
storageAccountType
- (Required) The Type of Storage Account which should back this the Internal OS Disk. Possible values includestandardLrs
,standardSsdLrs
,standardSsdZrs
,premiumLrs
andpremiumZrs
. Changing this forces a new resource to be created. -
diffDiskSettings
- (Optional) AdiffDiskSettings
block as defined above. Changing this forces a new resource to be created. -
diskEncryptionSetId
- (Optional) The ID of the Disk Encryption Set which should be used to encrypt this OS Disk. Changing this forces a new resource to be created.
-> NOTE: Disk Encryption Sets are in Public Preview in a limited set of regions
-
diskSizeGb
- (Optional) The Size of the Internal OS Disk in GB, if you wish to vary from the size used in the image this Virtual Machine Scale Set is sourced from. -
writeAcceleratorEnabled
- (Optional) Specifies if Write Accelerator is enabled on the OS Disk. Defaults tofalse
.
A plan
block supports the following:
-
name
- (Required) Specifies the name of the image from the marketplace. Changing this forces a new resource to be created. -
publisher
- (Required) Specifies the publisher of the image. Changing this forces a new resource to be created. -
product
- (Required) Specifies the product of the image from the marketplace. Changing this forces a new resource to be created.
A protectedSettingsFromKeyVault
block supports the following:
-
secretUrl
- (Required) The URL to the Key Vault Secret which stores the protected settings. -
sourceVaultId
- (Required) The ID of the source Key Vault.
An identity
block supports the following:
-
type
- (Required) The type of Managed Identity that should be configured on this Orchestrated Windows Virtual Machine Scale Set. Only possible value isuserAssigned
. -
identityIds
- (Required) Specifies a list of User Managed Identity IDs to be assigned to this Orchestrated Windows Virtual Machine Scale Set.
A publicIpAddress
block supports the following:
-
name
- (Required) The Name of the Public IP Address Configuration. -
domainNameLabel
- (Optional) The Prefix which should be used for the Domain Name Label for each Virtual Machine Instance. Azure concatenates the Domain Name Label and Virtual Machine Index to create a unique Domain Name Label for each Virtual Machine. Valid values must be between1
and26
characters long, start with a lower case letter, end with a lower case letter or number and contains onlyaZ
,09
andhyphens
. -
idleTimeoutInMinutes
- (Optional) The Idle Timeout in Minutes for the Public IP Address. Possible values are in the range4
to32
. -
ipTag
- (Optional) One or moreipTag
blocks as defined above. Changing this forces a new resource to be created. -
publicIpPrefixId
- (Optional) The ID of the Public IP Address Prefix from where Public IP Addresses should be allocated. Changing this forces a new resource to be created. -
skuName
- (Optional) Specifies what Public IP Address SKU the Public IP Address should be provisioned as. Possible vaules includebasicRegional
,basicGlobal
,standardRegional
orstandardGlobal
. For more information about Public IP Address SKU's and their capabilities, please see the product documentation. Changing this forces a new resource to be created. -
version
- (Optional) The Internet Protocol Version which should be used for this public IP address. Possible values areiPv4
andiPv6
. Defaults toiPv4
. Changing this forces a new resource to be created.
A terminationNotification
block supports the following:
-
enabled
- (Required) Should the termination notification be enabled on this Virtual Machine Scale Set? Possible valuestrue
orfalse
-
timeout
- (Optional) Length of time (in minutes, between5
and15
) a notification to be sent to the VM on the instance metadata server till the VM gets deleted. The time duration should be specified iniso8601
format. Defaults topt5M
.
A sourceImageReference
block supports the following:
-
publisher
- (Required) Specifies the publisher of the image used to create the virtual machines. Changing this forces a new resource to be created. -
offer
- (Required) Specifies the offer of the image used to create the virtual machines. Changing this forces a new resource to be created. -
sku
- (Required) Specifies the SKU of the image used to create the virtual machines. -
version
- (Required) Specifies the version of the image used to create the virtual machines.
A priorityMix
block supports the following:
-
baseRegularCount
- (Optional) Specifies the base number of VMs ofregular
priority that will be created before any VMs of priorityspot
are created. Possible values are integers between0
and1000
. Defaults to0
. -
regularPercentageAboveBase
- (Optional) Specifies the desired percentage of VM instances that are ofregular
priority after the base count has been reached. Possible values are integers between0
and100
. Defaults to0
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
-
id
- The ID of the Orchestrated Virtual Machine Scale Set. -
uniqueId
- The Unique ID for the Orchestrated Virtual Machine Scale Set.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 60 minutes) Used when creating the Orchestrated Virtual Machine Scale Set.update
- (Defaults to 60 minutes) Used when updating the Orchestrated Virtual Machine Scale Set.read
- (Defaults to 5 minutes) Used when retrieving the Orchestrated Virtual Machine Scale Set.delete
- (Defaults to 60 minutes) Used when deleting the Orchestrated Virtual Machine Scale Set.
Import
An Orchestrated Virtual Machine Scale Set can be imported using the resourceId
, e.g.