Resource: awsInternetGatewayAttachment
Provides a resource to create a VPC Internet Gateway Attachment.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsInternetGatewayExample = new aws.internetGateway.InternetGateway(
this,
"example",
{}
);
const awsVpcExample = new aws.vpc.Vpc(this, "example_1", {
cidrBlock: "10.1.0.0/16",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcExample.overrideLogicalId("example");
const awsInternetGatewayAttachmentExample =
new aws.internetGatewayAttachment.InternetGatewayAttachment(
this,
"example_2",
{
internetGatewayId: awsInternetGatewayExample.id,
vpcId: awsVpcExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsInternetGatewayAttachmentExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
internetGatewayId
- (Required) The ID of the internet gateway.vpcId
- (Required) The ID of the VPC.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the VPC and Internet Gateway separated by a colon.
Timeouts
create
- (Default20M
)delete
- (Default20M
)
Import
Internet Gateway Attachments can be imported using the id
, e.g.