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

     1  ---
     2  layout: "openstack"
     3  page_title: "OpenStack: openstack_networking_subnet_v2"
     4  sidebar_current: "docs-openstack-resource-networking-subnet-v2"
     5  description: |-
     6    Manages a V2 Neutron subnet resource within OpenStack.
     7  ---
     8  
     9  # openstack\_networking\_subnet_v2
    10  
    11  Manages a V2 Neutron subnet resource within OpenStack.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "openstack_networking_network_v2" "network_1" {
    17    name = "tf_test_network"
    18    admin_state_up = "true"
    19  }
    20  
    21  resource "openstack_networking_subnet_v2" "subnet_1" {
    22    network_id = "${openstack_networking_network_v2.network_1.id}"
    23    cidr = "192.168.199.0/24"
    24  }
    25  ```
    26  
    27  ## Argument Reference
    28  
    29  The following arguments are supported:
    30  
    31  * `region` - (Required) The region in which to obtain the V2 Networking client.
    32      A Networking client is needed to create a Neutron subnet. If omitted, the
    33      `OS_REGION_NAME` environment variable is used. Changing this creates a new
    34      subnet.
    35  
    36  * `network_id` - (Required) The UUID of the parent network. Changing this
    37      creates a new subnet.
    38  
    39  * `cidr` - (Required) CIDR representing IP range for this subnet, based on IP
    40      version. Changing this creates a new subnet.
    41  
    42  * `ip_version` - (Optional) IP version, either 4 (default) or 6. Changing this creates a
    43      new subnet.
    44  
    45  * `name` - (Optional) The name of the subnet. Changing this updates the name of
    46      the existing subnet.
    47  
    48  * `tenant_id` - (Optional) The owner of the subnet. Required if admin wants to
    49      create a subnet for another tenant. Changing this creates a new subnet.
    50  
    51  * `allocation_pools` - (Optional) An array of sub-ranges of CIDR available for
    52      dynamic allocation to ports. The allocation_pool object structure is
    53      documented below. Changing this creates a new subnet.
    54  
    55  * `gateway_ip` - (Optional)  Default gateway used by devices in this subnet.
    56      Changing this updates the gateway IP of the existing subnet.
    57  
    58  * `enable_dhcp` - (Optional) The administrative state of the network.
    59      Acceptable values are "true" and "false". Changing this value enables or
    60      disables the DHCP capabilities of the existing subnet.
    61  
    62  * `dns_nameservers` - (Optional) An array of DNS name server names used by hosts
    63      in this subnet. Changing this updates the DNS name servers for the existing
    64      subnet.
    65  
    66  * `host_routes` - (Optional) An array of routes that should be used by devices
    67      with IPs from this subnet (not including local subnet route). The host_route
    68      object structure is documented below. Changing this updates the host routes
    69      for the existing subnet.
    70  
    71  The `allocation_pools` block supports:
    72  
    73  * `start` - (Required) The starting address.
    74  
    75  * `end` - (Required) The ending address.
    76  
    77  The `host_routes` block supports:
    78  
    79  * `destination_cidr` - (Required) The destination CIDR.
    80  
    81  * `next_hop` - (Required) The next hop in the route.
    82  
    83  ## Attributes Reference
    84  
    85  The following attributes are exported:
    86  
    87  * `region` - See Argument Reference above.
    88  * `network_id` - See Argument Reference above.
    89  * `cidr` - See Argument Reference above.
    90  * `ip_version` - See Argument Reference above.
    91  * `name` - See Argument Reference above.
    92  * `tenant_id` - See Argument Reference above.
    93  * `allocation_pools` - See Argument Reference above.
    94  * `gateway_ip` - See Argument Reference above.
    95  * `enable_dhcp` - See Argument Reference above.
    96  * `dns_nameservers` - See Argument Reference above.
    97  * `host_routes` - See Argument Reference above.