diff --git a/deploy/stacks/vpc.py b/deploy/stacks/vpc.py index 45c7ac685..2f29df479 100644 --- a/deploy/stacks/vpc.py +++ b/deploy/stacks/vpc.py @@ -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(