Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created March 7, 2022 18:36
Show Gist options
  • Save youngsoul/515e8cc32e2b11a44a1eed963af8b1db to your computer and use it in GitHub Desktop.
Save youngsoul/515e8cc32e2b11a44a1eed963af8b1db to your computer and use it in GitHub Desktop.
Example CDK for a VPC
ec2.Vpc(self, id=f'{resources_prefix}-VPC',
cidr='10.40.0.0/16',
max_azs=1,
enable_dns_hostnames=True,
enable_dns_support=True,
subnet_configuration=[
ec2.SubnetConfiguration(
name="Public",
subnet_type=ec2.SubnetType.PUBLIC,
cidr_mask=24
)
],
nat_gateways=None
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment