github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/aws/r/vpc.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_vpc"
     4  sidebar_current: "docs-aws-resource-vpc"
     5  description: |-
     6    Provides an VPC resource.
     7  ---
     8  
     9  # aws\_vpc
    10  
    11  Provides an VPC resource.
    12  
    13  ## Example Usage
    14  
    15  Basic usage:
    16  
    17  ```
    18  resource "aws_vpc" "main" {
    19      cidr_block = "10.0.0.0/16"
    20  }
    21  ```
    22  
    23  Basic usage with tags:
    24  
    25  ```
    26  resource "aws_vpc" "main" {
    27  	cidr_block = "10.0.0.0/16"
    28  	instance_tenancy = "dedicated"
    29  
    30  	tags {
    31  		Name = "main"
    32  	}
    33  }
    34  ```
    35  
    36  ## Argument Reference
    37  
    38  The following arguments are supported:
    39  
    40  * `cidr_block` - (Required) The CIDR block for the VPC.
    41  * `instance_tenancy` - (Optional) A tenancy option for instances launched into the VPC
    42  * `enable_dns_support` - (Optional) A boolean flag to enable/disable DNS support in the VPC. Defaults true.
    43  * `enable_dns_hostnames` - (Optional) A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
    44  * `tags` - (Optional) A mapping of tags to assign to the resource.
    45  
    46  ## Attributes Reference
    47  
    48  The following attributes are exported:
    49  
    50  * `id` - The ID of the VPC
    51  * `cidr_block` - The CIDR block of the VPC
    52  * `instance_tenancy` - Tenancy of instances spin up within VPC.
    53  * `enable_dns_support` - Whether or not the VPC has DNS support
    54  * `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support
    55  * `main_route_table_id` - The ID of the main route table associated with
    56       this VPC. Note that you can change a VPC's main route table by using an
    57       [`aws_main_route_table_association`](/docs/providers/aws/r/main_route_table_assoc.html).
    58  * `default_network_acl_id` - The ID of the network ACL created by default on VPC creation
    59  * `default_security_group_id` - The ID of the security group created by default on VPC creation