Experimental
@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InternetGatewayOptions Struct
Options to define InternetGateway for VPC.
Example
ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc');
const subnet = new SubnetV2(this, 'Subnet', {
vpc: myVpc,
availabilityZone: 'eu-west-2a',
ipv4CidrBlock: new IpCidr('10.0.0.0/24'),
subnetType: SubnetType.PUBLIC });
myVpc.addInternetGateway({
ipv4Destination: '192.168.0.0/16',
});
Properties
internetGatewayNameoptionalstringinternet_gateway_nameoptionalstrinternetGatewayNameoptionalStringInternetGatewayNameoptionalstringInternetGatewayNameoptional*string#The resource name of the internet gateway.
Default: provisioned without a resource name
Provided name will be used for tagging
ipv4Destinationoptionalstringipv4_destinationoptionalstripv4DestinationoptionalStringIpv4DestinationoptionalstringIpv4Destinationoptional*string#Destination Ipv6 address for EGW route.
Default: '0.0.0.0' all Ipv4 traffic
ipv6Destinationoptionalstringipv6_destinationoptionalstripv6DestinationoptionalStringIpv6DestinationoptionalstringIpv6Destinationoptional*string#Destination Ipv6 address for EGW route.
Default: '::/0' all Ipv6 traffic
subnetsoptionalSubnetSelection[]subnetsoptionaltyping.List[SubnetSelection]subnetsoptionalList<SubnetSelection>SubnetsoptionalSubnetSelection[]Subnetsoptional*[]SubnetSelection#List of subnets where route to IGW will be added.
Default: route created for all subnets with Type SubnetType.Public