github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/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 --- 6 7 # aws\_vpc 8 9 Provides an VPC resource. 10 11 ## Example Usage 12 13 Basic usage: 14 15 ``` 16 resource "aws_vpc" "main" { 17 cidr_block = "10.0.0.0/16" 18 } 19 ``` 20 21 Basic usage with tags: 22 23 ``` 24 resource "aws_vpc" "main" { 25 cidr_block = "10.0.0.0/16" 26 27 tags { 28 Name = "main" 29 } 30 } 31 ``` 32 33 ## Argument Reference 34 35 The following arguments are supported: 36 37 * `cidr_block` - (Required) The CIDR block for the VPC. 38 * `enable_dns_support` - (Optional) A boolean flag to enable/disable DNS support in the VPC. Defaults true. 39 * `enable_dns_hostnames` - (Optional) A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 40 * `tags` - (Optional) A mapping of tags to assign to the resource. 41 42 ## Attributes Reference 43 44 The following attributes are exported: 45 46 * `id` - The ID of the VPC 47 * `cidr_block` - The CIDR block of the VPC 48 * `enable_dns_support` - Whether or not the VPC has DNS support 49 * `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support 50 * `main_route_table_id` - The ID of the main route table associated with 51 this VPC.