2014-07-23 23:41:48 +02:00
|
|
|
---
|
|
|
|
layout: "aws"
|
|
|
|
page_title: "AWS: aws_internet_gateway"
|
|
|
|
sidebar_current: "docs-aws-resource-internet-gateway"
|
2014-10-22 05:21:56 +02:00
|
|
|
description: |-
|
|
|
|
Provides a resource to create a VPC Internet Gateway.
|
2014-07-23 23:41:48 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# aws\_internet\_gateway
|
|
|
|
|
|
|
|
Provides a resource to create a VPC Internet Gateway.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "aws_internet_gateway" "gw" {
|
|
|
|
vpc_id = "${aws_vpc.main.id}"
|
2015-02-11 14:33:59 +01:00
|
|
|
|
|
|
|
tags {
|
|
|
|
Name = "main"
|
|
|
|
}
|
2014-07-23 23:41:48 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `vpc_id` - (Required) The VPC ID to create in.
|
2015-02-11 14:33:59 +01:00
|
|
|
* `tags` - (Optional) A mapping of tags to assign to the resource.
|
2014-07-23 23:41:48 +02:00
|
|
|
|
2015-03-13 21:39:17 +01:00
|
|
|
-> **Note:** When using Internet Gateways with AWS Instances or Elastic IPs,
|
|
|
|
it is recommended to denote that they depend on the Internet Gateway created,
|
|
|
|
via the `depends_on` attribute:
|
|
|
|
`depends_on = ["aws_internet_gateway.gw"]`.
|
|
|
|
|
2014-07-23 23:41:48 +02:00
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the Internet Gateway.
|
|
|
|
|