github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/google/r/compute_subnetwork.html.markdown (about)

     1  ---
     2  layout: "google"
     3  page_title: "Google: google_compute_subnetwork"
     4  sidebar_current: "docs-google-compute-subnetwork"
     5  description: |-
     6    Manages a subnetwork within GCE.
     7  ---
     8  
     9  # google\_compute\_subnetwork
    10  
    11  Manages a subnetwork within GCE. For more information see 
    12  [the official documentation](https://cloud.google.com/compute/docs/vpc/#vpc_networks_and_subnets)
    13  and 
    14  [API](https://cloud.google.com/compute/docs/reference/latest/subnetworks).
    15  
    16  ## Example Usage
    17  
    18  ```hcl
    19  resource "google_compute_subnetwork" "default-us-east1" {
    20    name          = "default-us-east1"
    21    ip_cidr_range = "10.0.0.0/16"
    22    network       = "${google_compute_network.default.self_link}"
    23    region        = "us-east1"
    24  }
    25  ```
    26  
    27  ## Argument Reference
    28  
    29  The following arguments are supported:
    30  
    31  * `ip_cidr_range` - (Required) The IP address range that machines in this
    32      network are assigned to, represented as a CIDR block.
    33  
    34  * `name` - (Required) A unique name for the resource, required by GCE.
    35      Changing this forces a new resource to be created.
    36  
    37  * `network` - (Required) The network name or resource link to the parent
    38      network of this subnetwork. The parent network must have been created
    39      in custom subnet mode.
    40  
    41  - - -
    42  
    43  * `description` - (Optional) Description of this subnetwork.
    44  
    45  * `project` - (Optional) The project in which the resource belongs. If it
    46      is not provided, the provider project is used.
    47  
    48  * `region` - (Optional) The region this subnetwork will be created in. If
    49      unspecified, this defaults to the region configured in the provider.
    50  
    51  * `private_ip_google_access` - (Optional) Whether the VMs in this subnet
    52      can access Google services without assigned external IP
    53      addresses.
    54  
    55  ## Attributes Reference
    56  
    57  In addition to the arguments listed above, the following computed attributes are
    58  exported:
    59  
    60  * `gateway_address` - The IP address of the gateway.
    61  
    62  * `self_link` - The URI of the created resource.