Skip to content

Commit

Permalink
Fix: condition when there are no public subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lorch committed Oct 15, 2023
1 parent 6e2fdb0 commit de87e6e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions deploy/stacks/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ def __init__(
description=f'{resource_prefix}-{envname}-vpcId',
)

CfnOutput(
self,
f'{resource_prefix}-{envname}-publicSubnets',
export_name=f'{resource_prefix}-{envname}-publicSubnets',
value=(','.join(self.public_subnets)),
description=f'{resource_prefix}-{envname}-publicSubnets',
)
if self.vpc.public_subnets:
CfnOutput(
self,
f'{resource_prefix}-{envname}-publicSubnets',
export_name=f'{resource_prefix}-{envname}-publicSubnets',
value=(','.join(self.public_subnets)),
description=f'{resource_prefix}-{envname}-publicSubnets',
)

if self.vpc.vpc_cidr_block:
CfnOutput(
Expand Down

0 comments on commit de87e6e

Please sign in to comment.