Experimental
@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
EgressOnlyInternetGatewayOptions Struct
Options to define EgressOnlyInternetGateway for VPC.
Example
ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc',{
primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),
secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({
cidrBlockName: 'AmazonProvided',
})]
});
const routeTable = new RouteTable(this, 'RouteTable', {
vpc: myVpc,
});
const subnet = new SubnetV2(this, 'Subnet', {
vpc: myVpc,
availabilityZone: 'eu-west-2a',
ipv4CidrBlock: new IpCidr('10.0.0.0/24'),
ipv6CidrBlock: new IpCidr('2001:db8:1::/64'),
subnetType: SubnetType.PRIVATE });
myVpc.addEgressOnlyInternetGateway({
subnets: [{subnetType: SubnetType.PRIVATE}],
destination: '::/60',
})
Properties
Destination Ipv6 address for EGW route.
Default: '::/0' all Ipv6 traffic
egressOnlyInternetGatewayNamestringegress_only_internet_gateway_namestregressOnlyInternetGatewayNameStringEgressOnlyInternetGatewayNamestringEgressOnlyInternetGatewayName*string#The resource name of the egress-only internet gateway.
Default: no name tag associated and provisioned without a resource name
Provided name will be used for tagging
subnetsSubnetSelection[]subnetstyping.List[SubnetSelection]subnetsList<SubnetSelection>SubnetsSubnetSelection[]Subnets*[]SubnetSelection#List of subnets where route to EGW will be added.
Default: no route created