resource_group_name
|
A container that holds related resources for an Azure solution |
string |
n/a |
yes |
subnet_id
|
The ID of the subnet that the VM should use |
string |
n/a |
yes |
virtual_machine_name
|
The name of the virtual machine. Max 15 characters if os_flavor is set to windows
|
string |
n/a |
yes |
additional_capabilities
|
Additional capabilities for the VM |
object({ ultra_ssd_enabled = optional(bool, false) hibernation_enabled = optional(bool, true) }) |
null |
no |
admin_password
|
The Password which should be used for the local-administrator on this Virtual Machine |
string |
null |
no |
admin_ssh_key_data
|
specify the path to the existing SSH key to authenticate Linux virtual machine |
string |
null |
no |
admin_username
|
The username of the local administrator used for the Virtual Machine. |
string |
"sysadmin" |
no |
allow_extension_operations
|
Enable or disable VM extension operations? Defaults to true. |
bool |
true |
no |
availability_set_id
|
Attach the vm to a availability set. Only 'availability_zone' or 'availability_set_id' can be used |
string |
null |
no |
availability_zone
|
Set to a zone if you want the vm placed in a specific availability zone. One module instance supports only a single zone. |
number |
null |
no |
avd_register_session_host
|
Register VM to a host pool. Only works for Windows VMs and it needs to be aad joined |
object({ # # https://github.com/Azure/RDS-Templates/blob/master/ARM-wvd-templates/DSC/Configuration.zip (requires fw opening) # https://github.com/Azure/RDS-Templates/issues/790 # Finding the latest extension version can be done via Azure Portal --> AVD quickstart --> View template module_url = optional(string, "https://wvdportalstorageblob.blob.core.windows.net/galleryartifacts/Configuration_1.0.02790.438.zip") host_pool_name = string registration_info_token = string aad_join = optional(bool, true) }) |
null |
no |
bypass_platform_safety_checks_on_user_schedule_enabled
|
Set to true if platform safety checks should be bypassed on user schedule. Defaults to false. |
bool |
true |
no |
custom_image
|
Provide the custom image to this module if the default variants are not sufficient |
object({ publisher = string offer = string sku = string version = optional(string, "latest") }) |
null |
no |
custom_script_extension
|
Run a custom script on VM. See https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows for more information. Also works for Linux VMs. |
object({ command_to_execute = string script_urls = list(string) rerun_script_extension = optional(number, 0) }) |
null |
no |
datadisks
|
The disks to create and attach |
map(object({ size = string type = string caching = string lun = number override_name = optional(string, null) })) |
{} |
no |
dedicated_host_id
|
The ID of a Dedicated Host where this machine should be run on. |
string |
null |
no |
disable_password_authentication
|
Should Password Authentication be disabled on this Virtual Machine? Defaults to true. Only valid for Linux Virtual Machines. |
bool |
true |
no |
disk_controller_type
|
The disk controller type for the VM. Possible values are 'SCSI' and 'NVMe'. Defaults to 'SCSI'. |
string |
null |
no |
dns_servers
|
List of dns servers to use for network interface |
list(string) |
[] |
no |
enable_aad_login
|
Set to true if you want to enable AAD Login VM extension |
bool |
false |
no |
enable_accelerated_networking
|
Should Accelerated Networking be enabled? Defaults to false. |
bool |
false |
no |
enable_automatic_updates
|
Enable automatic updates of windows VM? Defaults to true. |
bool |
true |
no |
enable_disk_encryption
|
Set to true if disk encryption is not necessary. |
bool |
false |
no |
enable_managed_identity
|
Set to true if the machine should be equipped with a managed identity. Defaults to false. |
bool |
false |
no |
encrypt_operation
|
Value for which encrypt operation. Defaults to EnableEncryption. |
string |
"EnableEncryption" |
no |
encryption_algorithm
|
Encryption Algorithm. Defaults to RSA-OAEP. |
string |
"RSA-OAEP" |
no |
encryption_at_host_enabled
|
Enable or disable encryption at host. Cannot be used with Azure Disk Encryption. Defaults to false. |
bool |
true |
no |
encryption_key_url
|
URL to Key Encrypt Key (KEK) |
string |
"" |
no |
encryption_key_vault_id
|
Key vault id if encrypting disks. Remember to allow for disk encryption usage. |
string |
null |
no |
encryption_key_vault_uri
|
Key vault uri if encrypting disks. Must be in same subscription. |
string |
null |
no |
generate_admin_ssh_key
|
Generates a secure private key and encodes it as PEM. |
bool |
true |
no |
host_name
|
Override the hostname of the virtual machine. |
string |
null |
no |
hotpatching_enabled
|
Enable or disable hotpatching for the VM. Defaults to false. |
bool |
false |
no |
ipconfig_name
|
Name of ipconfig if applicable. Defaults to ipconfig01. |
string |
"ipconfig01" |
no |
license_type
|
Specifies the type of on-premise license which should be used for this Virtual Machine. Possible values are None, Windows_Client and Windows_Server. |
string |
"None" |
no |
linux_distribution_name
|
Variable to pick an OS flavour for Linux based VM. |
string |
"ubuntu2404" |
no |
location
|
The Azure Region in which all resources should be created |
string |
"norwayeast" |
no |
maintenance_configuration_id
|
The ID of the Maintenance Configuration to use for this Virtual Machine. patch_mode must be set to AutomaticByPlatform. |
string |
null |
no |
managed_identity_roles
|
List of roles to assign to the managed identity |
map(object({ role_definition_name = string scope = string })) |
{} |
no |
os_disk_name
|
Override the OS disk name. If not set, the name will be generated from the virtual machine name. |
string |
null |
no |
os_disk_size_gb
|
Override the OS disk size the size used in the image this Virtual Machine is sourced from. |
number |
null |
no |
os_disk_storage_account_type
|
The Type of Storage Account which should back this the Internal OS Disk. Possible values include Standard_LRS, StandardSSD_LRS and Premium_LRS. |
string |
"Premium_LRS" |
no |
os_flavor
|
Specify the flavor of the operating system image to deploy Virtual Machine. Valid values are windows and linux
|
string |
"windows" |
no |
patch_assessment_mode
|
Possible values are ImageDefault, AutomaticByPlatform |
string |
"AutomaticByPlatform" |
no |
patch_mode
|
Possible values are Manual, AutomaticByOS, AutomaticByPlatform and ImageDefault |
string |
"AutomaticByPlatform" |
no |
private_ip_address
|
The Static IP Address which should be used. This is valid only when private_ip_address_allocation is set to Static
|
string |
null |
no |
private_ip_address_allocation_type
|
The allocation method used for the Private IP Address. Possible values are Dynamic and Static. |
string |
"Dynamic" |
no |
provision_vm_agent
|
Enable or disable provision of VM agent? Defaults to true. |
bool |
true |
no |
secure_boot_enabled
|
Enable or disable Secure Boot for the VM. |
bool |
true |
no |
source_image_id
|
The ID of an Image which each Virtual Machine should be based on |
string |
null |
no |
tags
|
A map of tags to add to all resources |
map(string) |
null |
no |
timezone
|
Time zone for virtual machine. Defaults to 'W. Europe Standard Time'. https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/
|
string |
"W. Europe Standard Time" |
no |
type_handler_version
|
Type handler version of the VM extension to use. Defaults to 2.2 on Windows and 1.1 on Linux |
string |
null |
no |
virtual_machine_size
|
The Virtual Machine SKU for the Virtual Machine, Default is Standard_B2as_v2 |
string |
"Standard_B2as_v2" |
no |
vm_agent_platform_updates_enabled
|
(DEPRECATED - remove in next major version bump) Enable or disable VM Agent platform updates. Defaults to true. |
bool |
true |
no |
vm_extension
|
Argument to create azurerm_virtual_machine_extension resource, the argument descriptions could be found at the document. |
object({ name = string publisher = string type = string type_handler_version = string auto_upgrade_minor_version = optional(bool) automatic_upgrade_enabled = optional(bool) failure_suppression_enabled = optional(bool, false) settings = optional(string) protected_settings = optional(string) protected_settings_from_key_vault = optional(object({ secret_url = string source_vault_id = string })) }) |
null |
no |
volume_type
|
Value for which disks to encrypt. Defaults to All. |
string |
"All" |
no |
vtpm_enabled
|
Enable or disable Virtual Trusted Platform Module (vTPM) for the VM. |
bool |
true |
no |
windows_distribution_name
|
Variable to pick an OS flavour for Windows based VM. |
string |
"windows2025az" |
no |