Resource: awsVpnGatewayAttachment
Provides a Virtual Private Gateway attachment resource, allowing for an existing hardware VPN gateway to be attached and/or detached from a VPC.
-> Note: The awsVpnGateway
resource can also automatically attach the Virtual Private Gateway it creates to an existing VPC by setting the vpcId
attribute accordingly.
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 awsVpcNetwork = new aws.vpc.Vpc(this, "network", {
cidrBlock: "10.0.0.0/16",
});
const awsVpnGatewayVpn = new aws.vpnGateway.VpnGateway(this, "vpn", {
tags: {
Name: "example-vpn-gateway",
},
});
new aws.vpnGatewayAttachment.VpnGatewayAttachment(this, "vpn_attachment", {
vpcId: awsVpcNetwork.id,
vpnGatewayId: awsVpnGatewayVpn.id,
});
See Virtual Private Cloud and Virtual Private Gateway user guides for more information.
Argument Reference
The following arguments are supported:
vpcId
- (Required) The ID of the VPC.vpnGatewayId
- (Required) The ID of the Virtual Private Gateway.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
vpcId
- The ID of the VPC that Virtual Private Gateway is attached to.vpnGatewayId
- The ID of the Virtual Private Gateway.
Import
This resource does not support importing.