github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/providers/azure/r/virtual_network.html.markdown (about)

     1  ---
     2  layout: "azure"
     3  page_title: "Azure: azure_virtual_network"
     4  sidebar_current: "docs-azure-resource-virtual-network"
     5  description: |-
     6    Creates a new virtual network including any configured subnets. Each subnet can optionally be configured with a security group to be associated with the subnet.
     7  ---
     8  
     9  # azure\_virtual\_network
    10  
    11  Creates a new virtual network including any configured subnets. Each subnet can
    12  optionally be configured with a security group to be associated with the subnet.
    13  
    14  ## Example Usage
    15  
    16  ```
    17  resource "azure_virtual_network" "default" {
    18      name = "test-network"
    19      address_space = ["10.1.2.0/24"]
    20      location = "West US"
    21  
    22      subnet {
    23          name = "subnet1"
    24          address_prefix = "10.1.2.0/25"
    25      }
    26  }
    27  ```
    28  
    29  ## Argument Reference
    30  
    31  The following arguments are supported:
    32  
    33  * `name` - (Required) The name of the virtual network. Changing this forces a
    34      new resource to be created.
    35  
    36  * `address_space` - (Required) The address space that is used the virtual
    37      network. You can supply more than one address space. Changing this forces
    38      a new resource to be created.
    39  
    40  * `location` - (Required) The location/region where the virtual network is
    41      created. Changing this forces a new resource to be created.
    42  
    43  * `dns_servers` - (Optional) List of names of DNS servers previously registered
    44      on Azure.
    45  
    46  * `subnet` - (Required) Can be specified multiple times to define multiple
    47      subnets. Each `subnet` block supports fields documented below.
    48  
    49  The `subnet` block supports:
    50  
    51  * `name` - (Required) The name of the subnet.
    52  
    53  * `address_prefix` - (Required) The address prefix to use for the subnet.
    54  
    55  * `security_group` - (Optional) The Network Security Group to associate with
    56      the subnet.
    57  
    58  ## Attributes Reference
    59  
    60  The following attributes are exported:
    61  
    62  * `id` - The virtual NetworkConfiguration ID.