Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.
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
}
tags
(Attributes List) Any tags to assign to the internet gateway. (see below for nested schema)id
(String) Uniquely identifies the resource.internet_gateway_id
(String)tags
Required:
key
(String) The tag key.value
(String) The tag value.Import is supported using the following syntax:
$ terraform import awscc_ec2_internet_gateway.example <resource ID>