Skip to content

Commit

Permalink
Update cdk_aws_cookbook_310_stack.py
Browse files Browse the repository at this point in the history
  • Loading branch information
johnculkin authored Mar 13, 2022
1 parent 06baa2d commit 69c0352
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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 @@ -49,7 +49,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)],
)

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

Expand All @@ -79,7 +79,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 @@ -89,7 +89,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 @@ -99,7 +99,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 @@ -154,7 +154,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 69c0352

Please sign in to comment.