azurestack_windows_virtual_machine_scale_set

Manages a Windows Virtual Machine Scale Set.

Disclaimers

Example Usage

This example provisions a basic Windows Virtual Machine Scale Set on an internal network. Additional examples of how to use the azurestack_windows_virtual_machine_scale_set resource can be found in the ./examples/vm-scale-set/windows` directory within the Github Repository.

provider "azurestack" {
  features {}
}

resource "azurestack_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurestack_virtual_network" "example" {
  name                = "example-network"
  resource_group_name = azurestack_resource_group.example.name
  location            = azurestack_resource_group.example.location
  address_space       = ["10.0.0.0/16"]
}

resource "azurestack_subnet" "internal" {
  name                 = "internal"
  resource_group_name  = azurestack_resource_group.example.name
  virtual_network_name = azurestack_virtual_network.example.name
  address_prefix       = "10.0.2.0/24"
}

resource "azurestack_windows_virtual_machine_scale_set" "example" {
  name                = "example-vmss"
  resource_group_name = azurestack_resource_group.example.name
  location            = azurestack_resource_group.example.location
  sku                 = "Standard_F2"
  instances           = 1
  admin_password      = "P@55w0rd1234!"
  admin_username      = "adminuser"

  source_image_reference {
    publisher = "MicrosoftWindowsServer"
    offer     = "WindowsServer"
    sku       = "2016-Datacenter-Server-Core"
    version   = "latest"
  }

  os_disk {
    storage_account_type = "Standard_LRS"
    caching              = "ReadWrite"
  }

  network_interface {
    name    = "example"
    primary = true

    ip_configuration {
      name      = "internal"
      primary   = true
      subnet_id = azurestack_subnet.internal.id
    }
  }
}

Argument Reference

The following arguments are supported:



A additional_capabilities block supports the following:


A additional_unattend_content block supports the following:


A automatic_os_upgrade_policy block supports the following:


A automatic_instance_repair block supports the following:


A boot_diagnostics block supports the following:


A certificate block supports the following:


A data_disk block supports the following:


A diff_disk_settings block supports the following:

option - (Required) Specifies the Ephemeral Disk Settings for the OS Disk. At this time the only possible value is Local. Changing this forces a new resource to be created.


An extension block supports the following:

A ip_configuration block supports the following:

A network_interface block supports the following:


A os_disk block supports the following:


A plan block supports the following:


A secret block supports the following:


A terminate_notification block supports the following:


A winrm_listener block supports the following:


source_image_reference supports the following:

Attributes Reference

In addition to all arguments above, the following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Windows Virtual Machine Scale Sets can be imported using the resource id, e.g.

terraform import azurestack_windows_virtual_machine_scale_set.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1