Experimental
@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InternetGatewayProps Struct
Properties to define an internet gateway.
Example
ts
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc');
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'),
subnetType: SubnetType.PRIVATE_ISOLATED });
const igw = new InternetGateway(this, 'IGW', {
vpc: myVpc,
});
new Route(this, 'IgwRoute', {
routeTable,
destination: '0.0.0.0/0',
target: { gateway: igw },
});
Properties
internetGatewayNameoptionalstringinternet_gateway_nameoptionalstrinternetGatewayNameoptionalStringInternetGatewayNameoptionalstringInternetGatewayNameoptional*string#The resource name of the internet gateway.
Default: provisioned without a resource name