terraform/website/source/docs/providers/aws/r/internet_gateway.html.markdown

50 lines
1006 B
Markdown
Raw Normal View History

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 22:04:27 +01:00
-> **Note:** It's recommended to denote that the AWS Instance or Elastic IP depends on the Internet Gateway. For example:
resource "aws_internet_gateway" "gw" {
vpc_id = "${aws_vpc.main.id}"
}
resource "aws_instance" "foo" {
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.