Skip to content

Latest commit

 

History

History
109 lines (93 loc) · 10.5 KB

File metadata and controls

109 lines (93 loc) · 10.5 KB

Terraform - Windows VM

Table of Contents

  1. Usage
  2. Requirements
  3. Inputs
  4. Outputs
  5. Resources
  6. Modules

Usage

This configuration creates a Windows VM with some simple extensions for management and monitoring.

When using a marketplace image, ensure that you accept the terms using the cli tools:

Azure CLI PowerShell

Requirements

Name Version
terraform >= 1.3.0
azurerm ~> 3.0

Inputs

Name Description Type Default Required
name The name of the virtual machine. string n/a yes
password Password of the virtual machine. string n/a yes
resource_group_name The name of the resource group this module will use. string n/a yes
subnet_id Subnet ID of the virtual machine. string n/a yes
accept_terms Enable if terms are needed to be accepted bool false no
agw_backend_address_pool_ids IDs of application gateways backends to assign this virtual machine's primary NIC to. list(string) [] no
autoshutdown Describes the autoshutdown configuration with time being in 24h format and timezone being a supported timezone.
object({
time = optional(string, "2200")
timezone = optional(string, "UTC")
email = optional(string)
})
null no
availability_set_id Availability set ID to add this virtual machine to. string null no
computer_name The OS-level computer name of the virtual machine. string null no
data_collection_enabled Enable data collection association. bool false no
data_collection_rule_id Data collection rule ID to associate to this virtual machine. string null no
dns_servers The DNS servers to use with this virtual network. list(string) null no
enable_aad_login Enable AAD Login extension. bool true no
enable_azure_monitor Enable Azure Monitor extension. bool true no
enable_azure_policy Enable Azure Policy extension. bool true no
enable_network_watcher Enable Network Watcher extension. bool true no
identity_ids User assigned identity IDs to append to this virtual machine. list(string) [] no
ip_address Private IP address of the virtual machine NIC. string null no
ip_forwarding Enable IP forwarding on the virtual machine NIC. bool false no
lb_backend_address_pool_ids IDs of load balancer backends to assign this virtual machine's primary NIC to. list(string) [] no
license_type License type to use when building the virtual machine. string null no
location The location of created resources. string "uksouth" no
network_security_group_enabled Assign a network security group. bool false no
network_security_group_id ID of the network security group to use with the virtual machine NIC. string null no
os_disk_caching Caching option of the OS Disk. string "None" no
os_disk_size_gb Size of the OS Disk in GB. number 128 no
os_disk_storage_account_type Type of the storage account. string "StandardSSD_LRS" no
patch_assessment_mode The patch assessment mode of the virtual machine. string null no
public_ip_enabled Enable public IP. bool false no
size Size of the virtual machine. string "Standard_B1s" no
source_image_id Source image ID to use when creating the virtual machine. string null no
source_image_plan_required Enable if plan block is required as part of the virtual machine. bool false no
source_image_reference Source image reference to use when creating the virtual machine.
object({
publisher = string
offer = string
sku = string
version = optional(string, "latest")
})
null no
tags Tags applied to created resources. map(string) null no
username Username of the virtual machine. string "vmadmin" no

Outputs

Name Description
computer_name The OS-level computer name of the virtual machine.
id ID of the virtual machine.
identity ID of the virtual machine.
ip_address IP address of the virtual machine.
location Location of the virtual machine.
name Name of the virtual machine.
public_ip_address Public IP address of the virtual machine.
resource_group_name Name of the virtual machine.
username The username on the created virtual machine.

Resources

Name Type
azurerm_dev_test_global_vm_shutdown_schedule.main resource
azurerm_marketplace_agreement.main resource
azurerm_monitor_data_collection_rule_association.main resource
azurerm_network_interface.main resource
azurerm_network_interface_application_gateway_backend_address_pool_association.main resource
azurerm_network_interface_backend_address_pool_association.main resource
azurerm_network_interface_security_group_association.main resource
azurerm_public_ip.main resource
azurerm_virtual_machine_extension.main_aadlogin resource
azurerm_virtual_machine_extension.main_azdependencyagent resource
azurerm_virtual_machine_extension.main_azmonitor resource
azurerm_virtual_machine_extension.main_aznetworkwatcheragent resource
azurerm_virtual_machine_extension.main_azpolicy resource
azurerm_windows_virtual_machine.main resource

Modules

No modules.


Classified
PUBLIC