Skip to content

Commit

Permalink
Update cdk_aws_cookbook_305_stack.py
Browse files Browse the repository at this point in the history
  • Loading branch information
johnculkin authored Mar 13, 2022
1 parent 69c0352 commit 33bfee8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:

isolated_subnets = ec2.SubnetConfiguration(
name="ISOLATED",
subnet_type=ec2.SubnetType.ISOLATED,
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,
cidr_mask=24
)

Expand All @@ -48,7 +48,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
vpc.add_gateway_endpoint(
's3GateWayEndPoint',
service=ec2.GatewayVpcEndpointAwsService('s3'),
subnets=[ec2.SubnetSelection(subnet_type=ec2.SubnetType.ISOLATED)],
subnets=[ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_ISOLATED)],
)

# -------- Begin EC2 Helper ---------
Expand All @@ -58,7 +58,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
private_dns_enabled=True,
subnets=ec2.SubnetSelection(
one_per_az=False,
subnet_type=ec2.SubnetType.ISOLATED
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
),
)

Expand All @@ -68,7 +68,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
private_dns_enabled=True,
subnets=ec2.SubnetSelection(
one_per_az=False,
subnet_type=ec2.SubnetType.ISOLATED
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
),
)

Expand All @@ -78,7 +78,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
private_dns_enabled=True,
subnets=ec2.SubnetSelection(
one_per_az=False,
subnet_type=ec2.SubnetType.ISOLATED
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
),
)

Expand Down Expand Up @@ -140,7 +140,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
value=vpc.vpc_id
)

isolated_subnets_list = vpc.select_subnets(subnet_type=ec2.SubnetType.ISOLATED)
isolated_subnets_list = vpc.select_subnets(subnet_type=ec2.SubnetType.PRIVATE_ISOLATED)

CfnOutput(
self,
Expand Down

0 comments on commit 33bfee8

Please sign in to comment.