github.com/lamielle/terraform@v0.3.2-0.20141121070651-81f008ba53d5/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 29 tags { 30 Name = "main" 31 } 32 } 33 ``` 34 35 ## Argument Reference 36 37 The following arguments are supported: 38 39 * `cidr_block` - (Required) The CIDR block for the VPC. 40 * `enable_dns_support` - (Optional) A boolean flag to enable/disable DNS support in the VPC. Defaults true. 41 * `enable_dns_hostnames` - (Optional) A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 42 * `tags` - (Optional) A mapping of tags to assign to the resource. 43 44 ## Attributes Reference 45 46 The following attributes are exported: 47 48 * `id` - The ID of the VPC 49 * `cidr_block` - The CIDR block of the VPC 50 * `enable_dns_support` - Whether or not the VPC has DNS support 51 * `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support 52 * `main_route_table_id` - The ID of the main route table associated with 53 this VPC.