github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/azurerm/r/availability_set.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_availability_set" 4 sidebar_current: "docs-azurerm-resource-virtualmachine-availability-set" 5 description: |- 6 Create an availability set for virtual machines. 7 --- 8 9 # azurerm\_availability\_set 10 11 Create an availability set for virtual machines. 12 13 ## Example Usage 14 15 ```hcl 16 resource "azurerm_resource_group" "test" { 17 name = "resourceGroup1" 18 location = "West US" 19 } 20 21 resource "azurerm_availability_set" "test" { 22 name = "acceptanceTestAvailabilitySet1" 23 location = "West US" 24 resource_group_name = "${azurerm_resource_group.test.name}" 25 26 tags { 27 environment = "Production" 28 } 29 } 30 ``` 31 32 ## Argument Reference 33 34 The following arguments are supported: 35 36 * `name` - (Required) Specifies the name of the availability set. Changing this forces a 37 new resource to be created. 38 39 * `resource_group_name` - (Required) The name of the resource group in which to 40 create the availability set. 41 42 * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. 43 44 * `platform_update_domain_count` - (Optional) Specifies the number of update domains that are used. Defaults to 5. 45 46 * `platform_fault_domain_count` - (Optional) Specifies the number of fault domains that are used. Defaults to 3. 47 48 * `managed` - (Optional) Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `false`. 49 50 * `tags` - (Optional) A mapping of tags to assign to the resource. 51 52 ## Attributes Reference 53 54 The following attributes are exported: 55 56 * `id` - The virtual AvailabilitySet ID. 57 58 59 ## Import 60 61 Availability Sets can be imported using the `resource id`, e.g. 62 63 ``` 64 terraform import azurerm_availability_set.group1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/availabilitySets/webAvailSet 65 ```