Skip to content

canada-ca-terraform-modules/terraform-azurerm-caf-windows_virtual_machineV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Providers

Name Version
azurerm 4.0.0
random n/a

Inputs

Name Description Type Default Required
env (Required) 4 character string defining the environment name prefix for the VM string n/a yes
group (Required) Character string defining the group for the target subscription string n/a yes
location Azure location for the VM string "canadacentral" no
private_dns_zone_ids List of private DNS zone ids of the target subscription any {} no
project (Required) Character string defining the project for the target subscription string n/a yes
resource_groups (Required) Resource group object for the VM any {} no
serverType 3 character string defining the server type for the VM string "SWJ" no
subnets (Required) List of subnet objects for the VM any n/a yes
tags Tags that will be applied to every associated VM resource map(string) {} no
userDefinedString (Required) User defined portion value for the name of the VM. string n/a yes
user_data Base64 encoded file representing user data script for the VM any null no
windows_VM Object containing all VM parameters any {} no

Outputs

Name Description
windows_vm_id Outputs the id of the VM
windows_vm_name Outputs the name of the VM
windows_vm_object Outputs the entire VM object

Admin password

The administrator password can be automatically generated by terraform or can be set by the user. In the case of a generated password, it will be stored in the subscription key vault. Here are the rules for the admin password:

  • A generated password by terraform wil be used IF RBAC authorization is enabled on the subscription keyvault AND password_overwrite it set to false
  • A user chosen password will be used IF RBAC authorization is disabled on the subscription keyvault OR password_overwrite is set to true

TFVAR parameters

VM Main Block Parameters

Parameter Name Possible Value Required Default Value
serverType SWJ Yes SWJ
postfix String Yes 01
resource_group RG name or ID Yes n/a
admin_username string Yes azureadmin
admin_password string No n/a
vm_size Valid VM sku Yes Standard_D2s_v5
backup_policy userDefinedString part of name or ID No daily1
disable_backup true,false No false
enable_automatic_updates true,false No true
patch_assessment_mode AutomaticByPlatform,ImageDefault Yes AutomaticByPlatform
patch_mode Manual,AutomaticByOS,AutomaticByPlatform Yes AutomaticByPlatform
computer_name string No n/a
user_data file path No n/a
boot_diagnostic true,false No false
use_nic_nsg true,false No false
allow_extension_operations true,false No true
availability_set_id Azure ID No n/a
bypass_platform_safety_checks_on_user_schedule_enabled true,false No false
capacity_reservation_group_id Azure ID No n/a
dedicated_host_id Azure ID No n/a
dedicated_host_group_id Azure ID No n/a
edge_zone Azure edge zone No n/a
disk_controller_type SCSI,NVMe No n/a
encryption_at_host_enabled true,false No n/a
eviction_policy Deallocate,Delete No n/a
extensions_time_budget PT1H30M No PT1H30M
hotpatching_enabled true,false No false
license_type None,Windows_Client,Windows_Server No n/a
max_bid_price int or -1 for disabled No -1
platform_fault_domain Azure fault domain No n/a
priority Regular,Spot No Regular
provision_vm_agent true,false No true
proximity_placement_group_id Azure ID No n/a
reboot_setting Always,IfRequired,Never No Never
secure_boot_enabled true,false No false
source_image_id Azure ID No n/a
timezone Valid timezone No UTC-11
virtual_machine_scale_set_id Azure ID No n/a
vm_agent_platform_updates_enabled true,false No false
vtpm_enabled true,false No false
zone Azure availability zone No n/a
tags map of strings No n/a

NIC Block

Parameter Name Possible Value Required Default Value
subnet Subnet name or ID Yes n/a
private_ip_address_allocation Dynamic,Static Yes Dynamic
private_ip_address IP address Yes n/a
dns_servers List of IP addresses No n/a
edge_zone Azure Edge zone No n/a
ip_forwarding_enabled true,false No false
accelerated_networking_enabled true,false No false
internal_dns_name_label string No n/a
tags map of strings No n/a

Storage Image Reference Block

Parameter Name Possible Value Required Default Value
publisher string Yes MicrosoftWindowsServer
offer string Yes WindowsServer
sku string Yes 2022-datacenter-g2
version string Yes latest

OS Disk Block

Parameter Name Possible Value Required Default Value
caching None,ReadOnly,ReadWrite No ReadWrite
storage_account_type Check TF Doc No Standard_LRS
disk_size_gb int No 128
write_accelerator_enabled true,false No false

Data Disks Block

Parameter Name Possible Value Required Default Value
name string Yes n/a
resource_group_name name or ID Yes n/a
storage_account_type See TF Doc No StandardSSD_LRS
create_option See Tf Doc No Empty
disk_size_gb int No 256
disk_iops_read_write int No null
disk_mbps_read_write int No null
disk_iops_read_only int No null
disk_mbps_read_only int No null
upload_size_bytes int No null
edge_zone Azure edge zone No null
hyper_v_generation V1,V2 No null
image_reference_id Azure ID No null
gallery_image_reference_id Azure ID No null
logical_sector_size int No null
optimized_frequent_attach_enabled true,false No false
performance_plus_enabled true,false No false
os_type Windows No null
source_resource_id Azure ID No null
source_uri URI No null
storage_account_id Azure ID No null
tier See TF Doc No null
max_shares int No null
trusted_launch_enabled true,false No null
security_type See TF Doc No null
secure_vm_disk_encryption_set_id Azure ID No null
on_demand_bursting_enabled true,false No null
zone Azure Availability zone No null
public_network_access_enabled true,false No false
tags map of strings No n/a

Auto Shutdown Config Block

Parameter Name Possible Value Required Default Value
enabled true,false Yes n/a
timezone See Azure Valid timezone Yes n/a
daily_recurrence_time Time Format: HHmm, eg. 1630 Yes n/a
notification_settings.enabled true,false Yes n/a
notification_settings.email string No n/a
notification_settings.time_in_minutes int No 30

Identity Block

Parameter Name Possible Value Required Default Value
type SystemAssigned,UserAssigned Yes n/a
identity_ids List of IDs No n/a

Additional Capabilities Block

Parameter Name Possible Value Required Default Value
ultra_ssd_enabled true,false Yes n/a
hibernation_enabled true,false Yes n/a

Boot Diagnostic block

Parameter Name Possible Value Required Default Value
use_managed_storage_account true,false no true
storage_account_resource_id Azure ID No n/a

Key_vault block

Parameter Name Possible Value Required Default Value
name string no Sub KV
resource_group_name string No Keyvault

Additional Unattend Content Block

Parameter Name Possible Value Required Default Value
content XML formatted string Yes n/a
setting AutoLogon,FirtLogonCommand Yes n/a

Gallery Application Block

Parameter Name Possible Value Required Default Value
version_id Azure ID Yes n/a
automatic_upgrade_enabled true,false No n/a
configuration_blob_uri URI No n/a
order int No n/a
tag string No n/a
treat_failure_as_deployment_failure_enabled true,false No n/a

Secret Block

Parameter Name Possible Value Required Default Value
certificate.store Cert store Yes n/a
certificate.url URL Yes n/a
key_vault_id Azure ID Yes n/a

Plan Block

Parameter Name Possible Value Required Default Value
name Marketplace image name Yes n/a
product Marketplace product name Yes n/a
publisher Marketplace publisher name Yes n/a

OS Image Notification Block

Parameter Name Possible Value Required Default Value
timeout PT15M No PT15M

Termination Notification Block

Parameter Name Possible Value Required Default Value
enabled true,false Yes n/a
timeout PTXM where X between 5 and 15 No n/a

WinRM Listener Block

Parameter Name Possible Value Required Default Value
protocol Https,Http Yes n/a
certificate_url Valid URL No n/a

Security Rules Block

Parameter Name Possible Value Required Default Value
name string Yes n/a
priority int Yes n/a
access string Yes n/a
protocol string Yes n/a
direction string Yes n/a
source_port_ranges list of string Yes n/a
source_address_prefixes list of string Yes n/a
destination_port_ranges list of string Yes n/a
destination_address_prefixes list of string Yes n/a
description string Yes n/a
tags map of strings No n/a

Load_balancer Address Pool

Parameter Name Possible Value Required Default Value
Address pool ID as the key Azure ID yes n/a

Aplication Security Group Association (ASG)

Parameter Name Possible Value Required Default Value
id Azure ID Yes n/a

About

New module for VM with new L2 standard

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages