1.7K Views
June 27, 24
スライド概要
クラウドLT大会 Vol.9に発表したときの資料です。
https://saison-coloris.connpass.com/event/320707/
■内容の訂正について
・発表時、アベイラビリティゾーンの選択について一部挙動が誤って説明をしておりました。
訂正してお詫び申し上げます。
色々なサーバーを運営しています。
Template AWS Cloud Development Kit (AWS CDK) Stack AWS CloudFormation
Name
availabilityZones?
cidr?
Type
string[]
string
Description
Availability zones this VPC spans.
The CIDR range to use for the VPC, e.g. '10.0.0.0/16'.
Default
a subset of AZs of the stack
Vpc.DEFAULT_CIDR_RANGE
createInternetGateway?
boolean
If set to false then disable the creation of the default internet gateway.
true
defaultInstanceTenancy?
DefaultInstanceTenancy
The default tenancy of instances launched into the VPC.
DefaultInstanceTenancy.Default (shared) tenancy
enableDnsHostnames?
boolean
Indicates whether the instances launched in the VPC get public DNS hostnames.
true
enableDnsSupport?
boolean
Indicates whether the DNS resolution is supported for the VPC.
true
flowLogs?
{ [string]: FlowLogOptions }
Flow logs to add to this VPC.
No flow logs
gatewayEndpoints?
{ [string]: GatewayVpcEndpointOptions }
Gateway endpoints to add to this VPC.
None
ipAddresses?
ipProtocol?
ipv6Addresses?
maxAzs?
natGatewayProvider?
IIpAddresses
IpProtocol
IIpv6Addresses
number
NatProvider
The Provider to use to allocate IPv4 Space to your VPC.
The protocol of the vpc.
The Provider to use to allocate IPv6 Space to your VPC.
Define the maximum number of AZs to use in this region.
What type of NAT provider to use.
ec2.IpAddresses.cidr
IpProtocol.IPV4_ONLY
Ipv6Addresses.amazonProvided
3
NatProvider.gateway()
natGatewaySubnets?
SubnetSelection
Configures the subnets which will have NAT Gateways/Instances.
All public subnets
natGateways?
reservedAzs?
number
number
The number of NAT Gateways/Instances to create.
Define the number of AZs to reserve.
One NAT gateway/instance per Availability Zone
0
restrictDefaultSecurityGroup?
boolean
If set to true then the default inbound & outbound rules will be removed from the default
security group.
subnetConfiguration?
SubnetConfiguration[]
Configure the subnets to build for each AZ.
vpcName?
string
The VPC name.
true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is
enabled, false otherwise
The VPC CIDR will be evenly divided between 1 public and 1
private subnet per AZ.
this.node.path
vpnConnections?
{ [string]: VpnConnectionOptions }
VPN connections to this VPC.
No connections
vpnGateway?
boolean
Indicates whether a VPN gateway should be created and attached to this VPC.
true when vpnGatewayAsn or vpnConnections is specified
vpnGatewayAsn?
number
The private Autonomous System Number (ASN) for the VPN gateway.
Amazon default ASN
vpnRoutePropagation?
SubnetSelection[]
Where to propagate VPN routes.
On the route tables associated with private subnets. If no
private subnets exists, isolated subnets are used. If no isolated
subnets exists, public subnets are used.
Name
availabilityZones?
cidr?
Type
string[]
string
Default
a subset of AZs of the stack
Vpc.DEFAULT_CIDR_RANGE
createInternetGateway?
boolean
true
defaultInstanceTenancy?
DefaultInstanceTenancy
DefaultInstanceTenancy.Default (shared) tenancy
enableDnsHostnames?
boolean
true
enableDnsSupport?
boolean
true
flowLogs?
{ [string]: FlowLogOptions }
No flow logs
gatewayEndpoints?
{
None
[string]: GatewayVpcEndpointOptions }
ipAddresses?
ipProtocol?
ipv6Addresses?
maxAzs?
natGatewayProvider?
IIpAddresses
IpProtocol
IIpv6Addresses
number
NatProvider
ec2.IpAddresses.cidr
IpProtocol.IPV4_ONLY
Ipv6Addresses.amazonProvided
3
NatProvider.gateway()
natGatewaySubnets?
SubnetSelection
All public subnets
natGateways?
reservedAzs?
number
number
One NAT gateway/instance per Availability Zone
0
restrictDefaultSecurityGroup?
boolean
subnetConfiguration?
SubnetConfiguration[]
vpcName?
string
true if '@aws-cdk/aws-ec2:restrictDefaultSecurityGroup' is
enabled, false otherwise
The VPC CIDR will be evenly divided between 1 public and 1
private subnet per AZ.
this.node.path
vpnConnections?
{ [string]: VpnConnectionOptions }
No connections
vpnGateway?
boolean
true when vpnGatewayAsn or vpnConnections is specified
vpnGatewayAsn?
number
Amazon default ASN
vpnRoutePropagation?
SubnetSelection[]
On the route tables associated with private subnets. If no
private subnets exists, isolated subnets are used. If no isolated
subnets exists, public subnets are used.