{"id":18578875,"url":"https://github.com/libre-devops/terraform-azurerm-windows-vm","last_synced_at":"2026-04-19T04:34:21.168Z","repository":{"id":118714639,"uuid":"482349889","full_name":"libre-devops/terraform-azurerm-windows-vm","owner":"libre-devops","description":"A module which tries to follow the \"KISS\" design model to deploying a VM.  Will created 1 ore more VMs, a NIC and a OS disk based on some parameters :knife:","archived":false,"fork":false,"pushed_at":"2025-04-26T00:30:46.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T14:20:31.460Z","etag":null,"topics":["azure","azurerm","azurerm-terraform-provider","module","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libre-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-16T20:04:02.000Z","updated_at":"2025-04-26T00:30:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"e145c5d3-21d1-4161-bb17-3bc6eda0e2d4","html_url":"https://github.com/libre-devops/terraform-azurerm-windows-vm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/libre-devops/terraform-azurerm-windows-vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-windows-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-windows-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-windows-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-windows-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libre-devops","download_url":"https://codeload.github.com/libre-devops/terraform-azurerm-windows-vm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-windows-vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31995105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azurerm","azurerm-terraform-provider","module","terraform","terraform-module"],"created_at":"2024-11-06T23:38:07.258Z","updated_at":"2026-04-19T04:34:21.150Z","avatar_url":"https://github.com/libre-devops.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"```hcl\nresource \"azurerm_public_ip\" \"pip\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm if vm.public_ip_sku != null }\n\n  name                = each.value.pip_name != null ? each.value.pip_name : \"pip-${each.value.name}\"\n  location            = var.location\n  resource_group_name = var.rg_name\n  allocation_method   = each.value.allocation_method\n  domain_name_label   = try(each.value.pip_custom_dns_label, each.value.computer_name, null)\n  sku                 = each.value.public_ip_sku\n  tags                = var.tags\n\n  lifecycle {\n    ignore_changes = [domain_name_label]\n  }\n}\n\nresource \"azurerm_network_interface\" \"nic\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm }\n\n  name                           = each.value.nic_name != null ? each.value.nic_name : \"nic-${each.value.name}\"\n  location                       = var.location\n  resource_group_name            = var.rg_name\n  accelerated_networking_enabled = each.value.enable_accelerated_networking\n\n  ip_configuration {\n    name                          = each.value.nic_ipconfig_name != null ? each.value.nic_ipconfig_name : \"nic-ipcon-${each.value.name}\"\n    primary                       = true\n    private_ip_address_allocation = each.value.static_private_ip == null ? \"Dynamic\" : \"Static\"\n    private_ip_address            = each.value.static_private_ip\n    public_ip_address_id          = lookup(each.value, \"public_ip_sku\", null) == null ? null : azurerm_public_ip.pip[each.key].id\n    subnet_id                     = each.value.subnet_id\n  }\n  tags = var.tags\n\n  timeouts {\n    create = \"5m\"\n    delete = \"10m\"\n  }\n}\n\nresource \"azurerm_application_security_group\" \"asg\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm if vm.create_asg == true }\n\n  name                = each.value.asg_name != null ? each.value.asg_name : \"asg-${each.value.name}\"\n  location            = var.location\n  resource_group_name = var.rg_name\n  tags                = var.tags\n}\n\nresource \"azurerm_network_interface_application_security_group_association\" \"asg_association\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm }\n\n  network_interface_id          = azurerm_network_interface.nic[each.key].id\n  application_security_group_id = each.value.asg_id != null ? each.value.asg_id : azurerm_application_security_group.asg[each.key].id\n}\n\n\nresource \"random_integer\" \"zone\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm if vm.availability_zone == \"random\" }\n  min      = 1\n  max      = 3\n}\n\nlocals {\n  sanitized_names = { for vm in var.windows_vms : vm.name =\u003e upper(replace(replace(replace(vm.name, \" \", \"\"), \"-\", \"\"), \"_\", \"\")) }\n  netbios_names   = { for key, value in local.sanitized_names : key =\u003e substr(value, 0, min(length(value), 15)) }\n  random_zones    = { for idx, vm in var.windows_vms : vm.name =\u003e vm.availability_zone == \"random\" ? tostring(idx + 1) : vm.availability_zone }\n}\n\nresource \"azurerm_windows_virtual_machine\" \"this\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm }\n\n  // Forces acceptance of marketplace terms before creating a VM\n  depends_on = [\n    azurerm_marketplace_agreement.plan_acceptance_simple,\n    azurerm_marketplace_agreement.plan_acceptance_custom\n  ]\n\n  name                         = each.value.name\n  resource_group_name          = var.rg_name\n  location                     = var.location\n  network_interface_ids        = [azurerm_network_interface.nic[each.key].id]\n  license_type                 = each.value.license_type\n  patch_mode                   = each.value.patch_mode\n  enable_automatic_updates     = each.value.enable_automatic_updates\n  computer_name                = each.value.computer_name != null ? each.value.computer_name : local.netbios_names[each.key]\n  admin_username               = each.value.admin_username\n  admin_password               = each.value.admin_password\n  size                         = each.value.vm_size\n  source_image_id              = try(each.value.use_custom_image, null) == true ? each.value.custom_source_image_id : null\n  zone                         = local.random_zones[each.key]\n  availability_set_id          = each.value.availability_set_id\n  virtual_machine_scale_set_id = each.value.virtual_machine_scale_set_id\n  timezone                     = each.value.timezone\n  user_data                    = each.value.user_data\n  custom_data                  = each.value.custom_data\n  tags                         = var.tags\n\n  encryption_at_host_enabled = each.value.enable_encryption_at_host\n  allow_extension_operations = each.value.allow_extension_operations\n  provision_vm_agent         = each.value.provision_vm_agent\n\n  dynamic \"additional_capabilities\" {\n    for_each = each.value.ultra_ssd_enabled ? [1] : []\n    content {\n      ultra_ssd_enabled = each.value.ultra_ssd_enabled\n    }\n  }\n\n  # Use simple image\n  dynamic \"source_image_reference\" {\n    for_each = try(each.value.use_simple_image, null) == true \u0026\u0026 try(each.value.use_simple_image_with_plan, null) == false \u0026\u0026 try(each.value.use_custom_image, null) == false ? [1] : []\n    content {\n      publisher = coalesce(each.value.vm_os_publisher, module.os_calculator[each.value.name].calculated_value_os_publisher)\n      offer     = coalesce(each.value.vm_os_offer, module.os_calculator[each.value.name].calculated_value_os_offer)\n      sku       = coalesce(each.value.vm_os_sku, module.os_calculator[each.value.name].calculated_value_os_sku)\n      version   = coalesce(each.value.vm_os_version, \"latest\")\n    }\n  }\n\n\n  # Use custom image reference\n  dynamic \"source_image_reference\" {\n    for_each = try(each.value.use_simple_image, null) == false \u0026\u0026 try(each.value.use_simple_image_with_plan, null) == false \u0026\u0026 try(length(each.value.source_image_reference), 0) \u003e 0 \u0026\u0026 try(length(each.value.plan), 0) == 0 \u0026\u0026 try(each.value.use_custom_image, null) == false ? [1] : []\n\n    content {\n      publisher = lookup(each.value.source_image_reference, \"publisher\", null)\n      offer     = lookup(each.value.source_image_reference, \"offer\", null)\n      sku       = lookup(each.value.source_image_reference, \"sku\", null)\n      version   = lookup(each.value.source_image_reference, \"version\", null)\n    }\n  }\n\n  dynamic \"source_image_reference\" {\n    for_each = try(each.value.use_simple_image, null) == true \u0026\u0026 try(each.value.use_simple_image_with_plan, null) == true \u0026\u0026 try(each.value.use_custom_image, null) == false ? [1] : []\n\n    content {\n      publisher = coalesce(each.value.vm_os_publisher, module.os_calculator_with_plan[each.value.name].calculated_value_os_publisher)\n      offer     = coalesce(each.value.vm_os_offer, module.os_calculator_with_plan[each.value.name].calculated_value_os_offer)\n      sku       = coalesce(each.value.vm_os_sku, module.os_calculator_with_plan[each.value.name].calculated_value_os_sku)\n      version   = coalesce(each.value.vm_os_version, \"latest\")\n    }\n  }\n\n\n  dynamic \"plan\" {\n    for_each = try(each.value.use_simple_image, null) == false \u0026\u0026 try(each.value.use_simple_image_with_plan, null) == false \u0026\u0026 try(length(each.value.plan), 0) \u003e 0 \u0026\u0026 try(each.value.use_custom_image, null) == false ? [1] : []\n\n    content {\n      name      = coalesce(each.value.vm_os_sku, module.os_calculator_with_plan[each.value.name].calculated_value_os_sku)\n      product   = coalesce(each.value.vm_os_offer, module.os_calculator_with_plan[each.value.name].calculated_value_os_offer)\n      publisher = coalesce(each.value.vm_os_publisher, module.os_calculator_with_plan[each.value.name].calculated_value_os_publisher)\n    }\n  }\n\n\n  dynamic \"plan\" {\n    for_each = try(each.value.use_simple_image, null) == false \u0026\u0026 try(each.value.use_simple_image_with_plan, null) == false \u0026\u0026 try(length(each.value.plan), 0) \u003e 0 \u0026\u0026 try(each.value.use_custom_image, null) == false ? [1] : []\n\n    content {\n      name      = lookup(each.value.plan, \"name\", null)\n      product   = lookup(each.value.plan, \"product\", null)\n      publisher = lookup(each.value.plan, \"publisher\", null)\n    }\n  }\n\n\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"SystemAssigned\" ? [each.value.identity_type] : []\n    content {\n      type = each.value.identity_type\n    }\n  }\n\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"SystemAssigned, UserAssigned\" ? [each.value.identity_type] : []\n    content {\n      type         = each.value.identity_type\n      identity_ids = try(each.value.identity_ids, [])\n    }\n  }\n\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"UserAssigned\" ? [each.value.identity_type] : []\n    content {\n      type         = each.value.identity_type\n      identity_ids = length(try(each.value.identity_ids, [])) \u003e 0 ? each.value.identity_ids : []\n    }\n  }\n\n\n  priority        = try(each.value.spot_instance, false) ? \"Spot\" : \"Regular\"\n  max_bid_price   = try(each.value.spot_instance, false) ? each.value.spot_instance_max_bid_price : null\n  eviction_policy = try(each.value.spot_instance, false) ? each.value.spot_instance_eviction_policy : null\n\n  os_disk {\n    name                             = each.value.os_disk.name != null ? each.value.os_disk.name : \"osdisk-${each.value.name}\"\n    caching                          = each.value.os_disk.caching\n    storage_account_type             = each.value.os_disk.os_disk_type\n    disk_size_gb                     = each.value.os_disk.disk_size_gb\n    disk_encryption_set_id           = each.value.os_disk.disk_encryption_set_id\n    secure_vm_disk_encryption_set_id = each.value.os_disk.secure_vm_disk_encryption_set_id\n    security_encryption_type         = each.value.os_disk.security_encryption_type\n    write_accelerator_enabled        = each.value.os_disk.write_accelerator_enabled\n\n    dynamic \"diff_disk_settings\" {\n      for_each = each.value.os_disk.diff_disk_settings != null ? [each.value.os_disk.diff_disk_settings] : []\n      content {\n        option = diff_disk_settings.value.option\n      }\n    }\n  }\n\n  dynamic \"boot_diagnostics\" {\n    for_each = each.value.boot_diagnostics_storage_account_uri != null ? [each.value.boot_diagnostics_storage_account_uri] : [null]\n    content {\n      storage_account_uri = boot_diagnostics.value\n    }\n  }\n\n\n  dynamic \"additional_unattend_content\" {\n    for_each = each.value.additional_unattend_content != null ? each.value.additional_unattend_content : []\n    content {\n      content = additional_unattend_content.value.content\n      setting = additional_unattend_content.value.setting\n    }\n  }\n\n  dynamic \"secret\" {\n    for_each = each.value.secrets != null ? each.value.secrets : []\n    content {\n      key_vault_id = secret.value.key_vault_id\n\n      dynamic \"certificate\" {\n        for_each = secret.value.certificates\n        content {\n          store = certificate.value.store\n          url   = certificate.value.url\n        }\n      }\n    }\n  }\n\n  dynamic \"termination_notification\" {\n    for_each = each.value.termination_notification != null ? [each.value.termination_notification] : []\n    content {\n      enabled = termination_notification.value.enabled\n      timeout = lookup(termination_notification.value, \"timeout\", \"PT5M\")\n    }\n  }\n\n  dynamic \"winrm_listener\" {\n    for_each = each.value.winrm_listener != null ? each.value.winrm_listener : []\n    content {\n      protocol        = winrm_listener.value.protocol\n      certificate_url = winrm_listener.value.certificate_url\n    }\n  }\n}\n\nmodule \"os_calculator\" {\n  source       = \"libre-devops/windows-os-sku-calculator/azurerm\"\n  for_each     = { for vm in var.windows_vms : vm.name =\u003e vm if try(vm.use_simple_image, null) == true }\n  vm_os_simple = each.value.vm_os_simple\n}\n\nmodule \"os_calculator_with_plan\" {\n  source       = \"libre-devops/windows-os-sku-with-plan-calculator/azurerm\"\n  for_each     = { for vm in var.windows_vms : vm.name =\u003e vm if try(vm.use_simple_image_with_plan, null) == true }\n  vm_os_simple = each.value.vm_os_simple\n}\n\nresource \"azurerm_marketplace_agreement\" \"plan_acceptance_simple\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm if try(vm.use_simple_image_with_plan, null) == true \u0026\u0026 try(vm.accept_plan, null) == true \u0026\u0026 try(vm.use_custom_image, null) == false }\n\n  publisher = coalesce(each.value.vm_os_publisher, module.os_calculator_with_plan[each.key].calculated_value_os_publisher)\n  offer     = coalesce(each.value.vm_os_offer, module.os_calculator_with_plan[each.key].calculated_value_os_offer)\n  plan      = coalesce(each.value.vm_os_sku, module.os_calculator_with_plan[each.key].calculated_value_os_sku)\n}\n\nresource \"azurerm_marketplace_agreement\" \"plan_acceptance_custom\" {\n  for_each = { for vm in var.windows_vms : vm.name =\u003e vm if try(vm.use_custom_image_with_plan, null) == true \u0026\u0026 try(vm.accept_plan, null) == true \u0026\u0026 try(vm.use_custom_image, null) == true }\n\n  publisher = lookup(each.value.plan, \"publisher\", null)\n  offer     = lookup(each.value.plan, \"product\", null)\n  plan      = lookup(each.value.plan, \"name\", null)\n}\n\n################################################################################\n# Modern Run Command (azurerm_virtual_machine_run_command)                     #\n################################################################################\nresource \"azurerm_virtual_machine_run_command\" \"windows_vm\" {\n  for_each = {\n    for vm in var.windows_vms :\n    vm.name =\u003e vm\n    /*\n      Create the resource only when the user has supplied\n      *one* of inline | script_file | script_uri\n    */\n    if vm.run_vm_command != null \u0026\u0026 (\n      try(vm.run_vm_command.inline, null) != null ||\n      try(vm.run_vm_command.script_file, null) != null ||\n      try(vm.run_vm_command.script_uri, null) != null\n    )\n  }\n\n  # ────────────────────────────────────────────────────────\n  # Required top-level arguments\n  # ────────────────────────────────────────────────────────\n  name = coalesce(\n    try(each.value.run_vm_command.extension_name, null),\n    \"run-cmd-${each.value.name}\"\n  )\n  location           = var.location\n  virtual_machine_id = azurerm_windows_virtual_machine.this[each.key].id\n  run_as_user        = try(each.value.run_vm_command.run_as_user, each.value.admin_username, null)\n  run_as_password    = try(each.value.run_vm_command.run_as_password, each.value.admin_password, null)\n  tags               = var.tags\n\n  # ────────────────────────────────────────────────────────\n  # Source block – exactly one form per VM\n  # ────────────────────────────────────────────────────────\n  dynamic \"source\" {\n    # ── case 1: inline string ─────────────────────────────\n    for_each = try(each.value.run_vm_command.inline, null) != null ? [1] : []\n    content {\n      script = each.value.run_vm_command.inline\n    }\n  }\n\n  dynamic \"source\" {\n    # ── case 2: local script file ─────────────────────────\n    for_each = try(each.value.run_vm_command.script_file, null) != null ? [1] : []\n    content {\n      # Read the file content at plan time\n      script = file(each.value.run_vm_command.script_file)\n    }\n  }\n\n  dynamic \"source\" {\n    # ── case 3: remote URI ────────────────────────────────\n    for_each = try(each.value.run_vm_command.script_uri, null) != null ? [1] : []\n    content {\n      script_uri = each.value.run_vm_command.script_uri\n    }\n  }\n\n  # ────────────────────────────────────────────────────────\n  # Preconditions – enforce “one and only one” source type\n  # ────────────────────────────────────────────────────────\n  lifecycle {\n    precondition {\n      condition = (\n        length(compact([\n          try(each.value.run_vm_command.inline, null),\n          try(each.value.run_vm_command.script_file, null),\n          try(each.value.run_vm_command.script_uri, null)\n        ])) == 1\n      )\n      error_message = \"run_vm_command for VM '${each.key}' must set exactly ONE of inline, script_file, or script_uri.\"\n    }\n\n    ignore_changes = [tags]\n  }\n}\n\n```\n## Requirements\n\nNo requirements.\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_azurerm\"\u003e\u003c/a\u003e [azurerm](#provider\\_azurerm) | 4.27.0 |\n| \u003ca name=\"provider_random\"\u003e\u003c/a\u003e [random](#provider\\_random) | 3.7.2 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_os_calculator\"\u003e\u003c/a\u003e [os\\_calculator](#module\\_os\\_calculator) | libre-devops/windows-os-sku-calculator/azurerm | n/a |\n| \u003ca name=\"module_os_calculator_with_plan\"\u003e\u003c/a\u003e [os\\_calculator\\_with\\_plan](#module\\_os\\_calculator\\_with\\_plan) | libre-devops/windows-os-sku-with-plan-calculator/azurerm | n/a |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [azurerm_application_security_group.asg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_security_group) | resource |\n| [azurerm_marketplace_agreement.plan_acceptance_custom](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/marketplace_agreement) | resource |\n| [azurerm_marketplace_agreement.plan_acceptance_simple](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/marketplace_agreement) | resource |\n| [azurerm_network_interface.nic](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface) | resource |\n| [azurerm_network_interface_application_security_group_association.asg_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface_application_security_group_association) | resource |\n| [azurerm_public_ip.pip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |\n| [azurerm_virtual_machine_run_command.windows_vm](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine_run_command) | resource |\n| [azurerm_windows_virtual_machine.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_virtual_machine) | resource |\n| [random_integer.zone](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_location\"\u003e\u003c/a\u003e [location](#input\\_location) | The region to place the resources | `string` | n/a | yes |\n| \u003ca name=\"input_rg_name\"\u003e\u003c/a\u003e [rg\\_name](#input\\_rg\\_name) | The resource group name to place the scale sets in | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags to be applied to the resource | `map(string)` | n/a | yes |\n| \u003ca name=\"input_windows_vms\"\u003e\u003c/a\u003e [windows\\_vms](#input\\_windows\\_vms) | List of VM configurations. | \u003cpre\u003elist(object({\u003cbr/\u003e    accept_plan = optional(bool, false)\u003cbr/\u003e    additional_unattend_content = optional(list(object({\u003cbr/\u003e      content = string\u003cbr/\u003e      setting = string\u003cbr/\u003e    })))\u003cbr/\u003e    admin_password                       = string\u003cbr/\u003e    admin_username                       = string\u003cbr/\u003e    allocation_method                    = optional(string, \"Static\")\u003cbr/\u003e    allow_extension_operations           = optional(bool, true)\u003cbr/\u003e    asg_id                               = optional(string, null)\u003cbr/\u003e    asg_name                             = optional(string, null)\u003cbr/\u003e    availability_set_id                  = optional(string)\u003cbr/\u003e    availability_zone                    = optional(string, \"random\")\u003cbr/\u003e    boot_diagnostics_storage_account_uri = optional(string, null)\u003cbr/\u003e    secrets = optional(list(object({\u003cbr/\u003e      key_vault_id = string\u003cbr/\u003e      certificates = list(object({\u003cbr/\u003e        store = string\u003cbr/\u003e        url   = string\u003cbr/\u003e      }))\u003cbr/\u003e    })))\u003cbr/\u003e    computer_name                 = optional(string)\u003cbr/\u003e    create_asg                    = optional(bool, true)\u003cbr/\u003e    custom_data                   = optional(string)\u003cbr/\u003e    custom_source_image_id        = optional(string, null)\u003cbr/\u003e    enable_accelerated_networking = optional(bool, false)\u003cbr/\u003e    enable_automatic_updates      = optional(bool, true)\u003cbr/\u003e    enable_encryption_at_host     = optional(bool, false)\u003cbr/\u003e    identity_ids                  = optional(list(string))\u003cbr/\u003e    identity_type                 = optional(string)\u003cbr/\u003e    license_type                  = optional(string)\u003cbr/\u003e    name                          = string\u003cbr/\u003e    nic_ipconfig_name             = optional(string)\u003cbr/\u003e    nic_name                      = optional(string, null)\u003cbr/\u003e    os_disk = object({\u003cbr/\u003e      caching      = optional(string, \"ReadWrite\")\u003cbr/\u003e      os_disk_type = optional(string, \"StandardSSD_LRS\")\u003cbr/\u003e      diff_disk_settings = optional(object({\u003cbr/\u003e        option = string\u003cbr/\u003e      }))\u003cbr/\u003e      disk_encryption_set_id           = optional(string, null)\u003cbr/\u003e      disk_size_gb                     = optional(number, \"127\")\u003cbr/\u003e      name                             = optional(string, null)\u003cbr/\u003e      secure_vm_disk_encryption_set_id = optional(string, null)\u003cbr/\u003e      security_encryption_type         = optional(string, null)\u003cbr/\u003e      write_accelerator_enabled        = optional(bool, false)\u003cbr/\u003e    })\u003cbr/\u003e    patch_mode                    = optional(string, \"AutomaticByOS\")\u003cbr/\u003e    pip_custom_dns_label          = optional(string)\u003cbr/\u003e    pip_name                      = optional(string)\u003cbr/\u003e    provision_vm_agent            = optional(bool, true)\u003cbr/\u003e    public_ip_sku                 = optional(string, null)\u003cbr/\u003e    source_image_reference        = optional(map(string))\u003cbr/\u003e    spot_instance                 = optional(bool, false)\u003cbr/\u003e    spot_instance_eviction_policy = optional(string)\u003cbr/\u003e    spot_instance_max_bid_price   = optional(string)\u003cbr/\u003e    static_private_ip             = optional(string)\u003cbr/\u003e    subnet_id                     = string\u003cbr/\u003e    termination_notification = optional(object({\u003cbr/\u003e      enabled = bool\u003cbr/\u003e      timeout = optional(string)\u003cbr/\u003e    }))\u003cbr/\u003e    run_vm_command = optional(object({\u003cbr/\u003e      extension_name  = optional(string)\u003cbr/\u003e      inline          = optional(string)\u003cbr/\u003e      script_file     = optional(string)\u003cbr/\u003e      script_uri      = optional(string)\u003cbr/\u003e      run_as_user     = optional(string)\u003cbr/\u003e      run_as_password = optional(string)\u003cbr/\u003e    }))\u003cbr/\u003e    timezone                     = optional(string)\u003cbr/\u003e    ultra_ssd_enabled            = optional(bool, false)\u003cbr/\u003e    use_custom_image             = optional(bool, false)\u003cbr/\u003e    use_custom_image_with_plan   = optional(bool, false)\u003cbr/\u003e    use_simple_image             = optional(bool, true)\u003cbr/\u003e    use_simple_image_with_plan   = optional(bool, false)\u003cbr/\u003e    user_data                    = optional(string, null)\u003cbr/\u003e    virtual_machine_scale_set_id = optional(string, null)\u003cbr/\u003e    vm_os_id                     = optional(string, \"\")\u003cbr/\u003e    vm_os_offer                  = optional(string)\u003cbr/\u003e    vm_os_publisher              = optional(string)\u003cbr/\u003e    vm_os_simple                 = optional(string)\u003cbr/\u003e    vm_os_sku                    = optional(string)\u003cbr/\u003e    vm_os_version                = optional(string)\u003cbr/\u003e    vm_size                      = string\u003cbr/\u003e    vtpm_enabled                 = optional(bool, false)\u003cbr/\u003e    winrm_listener = optional(list(object({\u003cbr/\u003e      protocol        = string\u003cbr/\u003e      certificate_url = optional(string)\u003cbr/\u003e    })))\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_asg_ids\"\u003e\u003c/a\u003e [asg\\_ids](#output\\_asg\\_ids) | List of ASG IDs. |\n| \u003ca name=\"output_asg_names\"\u003e\u003c/a\u003e [asg\\_names](#output\\_asg\\_names) | List of ASG Names. |\n| \u003ca name=\"output_managed_identities\"\u003e\u003c/a\u003e [managed\\_identities](#output\\_managed\\_identities) | Managed identities of the VMs |\n| \u003ca name=\"output_nic_private_ipv4_addresses\"\u003e\u003c/a\u003e [nic\\_private\\_ipv4\\_addresses](#output\\_nic\\_private\\_ipv4\\_addresses) | List of NIC Private IPv4 Addresses. |\n| \u003ca name=\"output_public_ip_ids\"\u003e\u003c/a\u003e [public\\_ip\\_ids](#output\\_public\\_ip\\_ids) | List of Public IP IDs. |\n| \u003ca name=\"output_public_ip_names\"\u003e\u003c/a\u003e [public\\_ip\\_names](#output\\_public\\_ip\\_names) | List of Public IP Names. |\n| \u003ca name=\"output_public_ip_values\"\u003e\u003c/a\u003e [public\\_ip\\_values](#output\\_public\\_ip\\_values) | List of Public IP Addresses. |\n| \u003ca name=\"output_vm_details_map\"\u003e\u003c/a\u003e [vm\\_details\\_map](#output\\_vm\\_details\\_map) | A map where the key is the VM name and the value is another map containing the VM ID and private IP address. |\n| \u003ca name=\"output_vm_ids\"\u003e\u003c/a\u003e [vm\\_ids](#output\\_vm\\_ids) | List of VM IDs. |\n| \u003ca name=\"output_vm_names\"\u003e\u003c/a\u003e [vm\\_names](#output\\_vm\\_names) | List of VM Names. |\n| \u003ca name=\"output_vm_run_command_ids\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_ids](#output\\_vm\\_run\\_command\\_ids) | Resource IDs of azurerm\\_virtual\\_machine\\_run\\_command objects |\n| \u003ca name=\"output_vm_run_command_instance_view\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_instance\\_view](#output\\_vm\\_run\\_command\\_instance\\_view) | Instance view of azurerm\\_virtual\\_machine\\_run\\_command objects |\n| \u003ca name=\"output_vm_run_command_locations\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_locations](#output\\_vm\\_run\\_command\\_locations) | Azure region where each run-command resource is created |\n| \u003ca name=\"output_vm_run_command_names\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_names](#output\\_vm\\_run\\_command\\_names) | Name property of each run-command resource |\n| \u003ca name=\"output_vm_run_command_script_uris\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_script\\_uris](#output\\_vm\\_run\\_command\\_script\\_uris) | Script URIs for commands defined via script\\_uri |\n| \u003ca name=\"output_vm_run_command_scripts\"\u003e\u003c/a\u003e [vm\\_run\\_command\\_scripts](#output\\_vm\\_run\\_command\\_scripts) | Inline script content for commands defined via inline or script\\_file |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-windows-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibre-devops%2Fterraform-azurerm-windows-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-windows-vm/lists"}