2014-07-23 22:32:33 +02:00
|
|
|
---
|
|
|
|
layout: "aws"
|
|
|
|
page_title: "AWS: aws_vpc"
|
|
|
|
sidebar_current: "docs-aws-resource-vpc"
|
|
|
|
---
|
|
|
|
|
|
|
|
# aws\_vpc
|
|
|
|
|
|
|
|
Provides an VPC resource.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2014-10-09 08:46:36 +02:00
|
|
|
Basic usage:
|
|
|
|
|
2014-07-23 22:32:33 +02:00
|
|
|
```
|
|
|
|
resource "aws_vpc" "main" {
|
|
|
|
cidr_block = "10.0.0.0/16"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2014-10-09 08:46:36 +02:00
|
|
|
Basic usage with tags:
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "aws_vpc" "main" {
|
|
|
|
cidr_block = "10.0.0.0/16"
|
|
|
|
|
|
|
|
tags {
|
|
|
|
Name = "main"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2014-07-23 22:32:33 +02:00
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `cidr_block` - (Required) The CIDR block for the VPC.
|
2014-08-09 14:43:00 +02:00
|
|
|
* `enable_dns_support` - (Optional) A boolean flag to enable/disable DNS support in the VPC. Defaults true.
|
|
|
|
* `enable_dns_hostnames` - (Optional) A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
|
2014-10-09 08:46:36 +02:00
|
|
|
* `tags` - (Optional) A mapping of tags to assign to the resource.
|
2014-07-23 22:32:33 +02:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the VPC
|
|
|
|
* `cidr_block` - The CIDR block of the VPC
|
2014-08-09 14:43:00 +02:00
|
|
|
* `enable_dns_support` - Whether or not the VPC has DNS support
|
|
|
|
* `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support
|
2014-07-23 22:32:33 +02:00
|
|
|
|