Skip to content

sironite/terraform-azurerm-windows_virtual_machine

Repository files navigation

Windows Virtual Machine

Changelog Notice Apache V2 License TF Registry

Usage - Module

Windows Virtual Machine

module "windows_virtual_machine" {
  source  = "sironite/windows_virtual_machine/azurerm"
  version = "X.X.X"

  name                = "windows-vm"
  resource_group_name = "windows-vm-example"
  location            = "West Europe"
  admin_username      = "adminuser"
  admin_password      = "Password1234!"

  network_interface_ids = [
    "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/windows-vm-example/providers/Microsoft.Network/networkInterfaces/windows-vm-nic"
  ]

  tags = {
    environment = "dev"
  }
}

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_windows_virtual_machine.this resource

Inputs

Name Description Type Required
admin_password The admin password for the virtual machine. string yes
admin_username The admin username for the virtual machine. string yes
computer_name The computer name of the virtual machine. string yes
location The location where the virtual machine will be created. string yes
resource_group_name The name of the resource group where the virtual machine will be created. string yes
vm_name The name of the virtual machine. string yes
availability_set_id The ID of the availability set that the virtual machine should be added to. string no
boot_diagnostics_storage_account_uri The URI of the storage account to use for boot diagnostics. string no
disk_encryption_set_id The ID of the disk encryption set for the virtual machine. string no
enable_automatic_updates Whether or not automatic updates are enabled on the virtual machine. bool no
identity_type The type of identity to assign to the virtual machine. string no
license_type The license type for the virtual machine. string no
network_interface_ids The IDs of the network interfaces attached to the virtual machine. list(string) no
os_disk_caching The caching mode for the OS disk for the virtual machine. string no
os_disk_name The name of the OS disk for the virtual machine. string no
os_disk_size_gb The size of the OS disk for the virtual machine. number no
os_disk_storage_account_type The storage account type for the OS disk for the virtual machine. string no
patch_assessment_mode The patch assessment mode for the virtual machine. string no
patch_mode The patch mode for the virtual machine. string no
provision_vm_agent Whether or not the VM agent should be provisioned on the virtual machine. bool no
proximity_placement_group_id The ID of the proximity placement group that the virtual machine should be added to. string no
secure_boot_enabled Whether or not secure boot is enabled on the virtual machine. bool no
source_image_offer The offer of the source image for the virtual machine. string no
source_image_publisher The publisher of the source image for the virtual machine. string no
source_image_sku The SKU of the source image for the virtual machine. string no
source_image_version The version of the source image for the virtual machine. string no
tags A map of tags to assign to the virtual machine. map(string) no
vm_size The size of the virtual machine. string no

Outputs

Name Description
vm_id The ID of the virtual machine.
vm_name The name of the virtual machine.
vm_private_ip The private IP address of the virtual machine.

Related documentation