awscc_ec2_internet_gateway (Resource)

Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.

Example Usage

Create internet gateway

To use awscc_ec2_internet_gateway to create internet gateway and attach it to VPC (using aws_internet_gateway_attachment)

resource "awscc_ec2_vpc" "example" {
  cidr_block = "10.1.0.0/16"
}

resource "awscc_ec2_internet_gateway" "example" {
  tags = [{
    key   = "Modified By"
    value = "AWSCC"
  }]
}

resource "awscc_ec2_vpc_gateway_attachment" "example" {
  internet_gateway_id = awscc_ec2_internet_gateway.example.id
  vpc_id              = awscc_ec2_vpc.example.id
}

Schema

Optional

Read-Only

Nested Schema for tags

Required:

Import

Import is supported using the following syntax:

$ terraform import awscc_ec2_internet_gateway.example <resource ID>