cdk-factory 0.15.1__py3-none-any.whl → 0.15.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,18 +88,33 @@ class VpcStack(IStack, EnhancedSsmParameterMixin):
88
88
  # Configure NAT gateways
89
89
  nat_gateway_count = self.vpc_config.nat_gateways.get("count", 1)
90
90
 
91
- # Create the VPC
92
- vpc = ec2.Vpc(
93
- self,
94
- vpc_name,
95
- vpc_name=vpc_name,
96
- cidr=self.vpc_config.cidr,
97
- max_azs=self.vpc_config.max_azs,
98
- nat_gateways=nat_gateway_count,
99
- subnet_configuration=subnet_configuration,
100
- enable_dns_hostnames=self.vpc_config.enable_dns_hostnames,
101
- enable_dns_support=self.vpc_config.enable_dns_support,
102
- gateway_endpoints=(
91
+ # Get explicit availability zones to avoid dummy AZs in pipeline synthesis
92
+ # When CDK synthesizes in a pipeline context, it doesn't have access to real AZs
93
+ # So we explicitly specify them based on the deployment region
94
+ availability_zones = None
95
+ if self.deployment:
96
+ region = self.deployment.region or "us-east-1"
97
+ # Explicitly list AZs for the region to avoid dummy values
98
+ max_azs = self.vpc_config.max_azs or 2
99
+ if region == "us-east-1":
100
+ availability_zones = [f"us-east-1{chr(97+i)}" for i in range(max_azs)] # us-east-1a, us-east-1b, etc.
101
+ elif region == "us-east-2":
102
+ availability_zones = [f"us-east-2{chr(97+i)}" for i in range(max_azs)]
103
+ elif region == "us-west-1":
104
+ availability_zones = [f"us-west-1{chr(97+i)}" for i in range(max_azs)]
105
+ elif region == "us-west-2":
106
+ availability_zones = [f"us-west-2{chr(97+i)}" for i in range(max_azs)]
107
+
108
+ # Build VPC properties
109
+ # Note: CDK doesn't allow both 'availability_zones' and 'max_azs' - use one or the other
110
+ vpc_props = {
111
+ "vpc_name": vpc_name,
112
+ "cidr": self.vpc_config.cidr,
113
+ "nat_gateways": nat_gateway_count,
114
+ "subnet_configuration": subnet_configuration,
115
+ "enable_dns_hostnames": self.vpc_config.enable_dns_hostnames,
116
+ "enable_dns_support": self.vpc_config.enable_dns_support,
117
+ "gateway_endpoints": (
103
118
  {
104
119
  "S3": ec2.GatewayVpcEndpointOptions(
105
120
  service=ec2.GatewayVpcEndpointAwsService.S3
@@ -108,7 +123,16 @@ class VpcStack(IStack, EnhancedSsmParameterMixin):
108
123
  if self.vpc_config.enable_s3_endpoint
109
124
  else None
110
125
  ),
111
- )
126
+ }
127
+
128
+ # Use either availability_zones or max_azs, not both
129
+ if availability_zones:
130
+ vpc_props["availability_zones"] = availability_zones
131
+ else:
132
+ vpc_props["max_azs"] = self.vpc_config.max_azs
133
+
134
+ # Create the VPC
135
+ vpc = ec2.Vpc(self, vpc_name, **vpc_props)
112
136
 
113
137
  # Add interface endpoints if specified
114
138
  if self.vpc_config.enable_interface_endpoints:
cdk_factory/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.15.1"
1
+ __version__ = "0.15.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.15.1
3
+ Version: 0.15.3
4
4
  Summary: CDK Factory. A QuickStarter and best practices setup for CDK projects
5
5
  Author-email: Eric Wilson <eric.wilson@geekcafe.com>
6
6
  License: MIT License
@@ -2,7 +2,7 @@ cdk_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  cdk_factory/app.py,sha256=RnX0-pwdTAPAdKJK_j13Zl8anf9zYKBwboR0KA8K8xM,10346
3
3
  cdk_factory/cdk.json,sha256=SKZKhJ2PBpFH78j-F8S3VDYW-lf76--Q2I3ON-ZIQfw,3106
4
4
  cdk_factory/cli.py,sha256=FGbCTS5dYCNsfp-etshzvFlGDCjC28r6rtzYbe7KoHI,6407
5
- cdk_factory/version.py,sha256=PQVflpJdJDETGf2g1BB5OHCS_5KtgteERschfoSBtss,23
5
+ cdk_factory/version.py,sha256=WbcBdqaNCRHsRqs6rGd3pRLP4kQSII2td9dR0Fl6HcU,23
6
6
  cdk_factory/builds/README.md,sha256=9BBWd7bXpyKdMU_g2UljhQwrC9i5O_Tvkb6oPvndoZk,90
7
7
  cdk_factory/commands/command_loader.py,sha256=QbLquuP_AdxtlxlDy-2IWCQ6D-7qa58aphnDPtp_uTs,3744
8
8
  cdk_factory/configurations/base_config.py,sha256=JKjhNsy0RCUZy1s8n5D_aXXI-upR9izaLtCTfKYiV9k,9624
@@ -111,7 +111,7 @@ cdk_factory/stack_library/security_group/security_group_full_stack.py,sha256=zu-
111
111
  cdk_factory/stack_library/security_group/security_group_stack.py,sha256=2zxd5ozgQ4GP0xi-Ni7SyChtEAOzC0nXeGz78DPXwPg,14445
112
112
  cdk_factory/stack_library/simple_queue_service/sqs_stack.py,sha256=jJksWrvrvgZUMM01RZ317DOIxqIJbkYYSYu38w0jHpc,6039
113
113
  cdk_factory/stack_library/vpc/__init__.py,sha256=7pIqP97Gf2AJbv9Ebp1WbQGHYhgEbWJ52L1MzeXBybA,42
114
- cdk_factory/stack_library/vpc/vpc_stack.py,sha256=zdDiGilf03esxuya5Z8zVYSVMAIuZBeD-ZKgfnEd6aw,10077
114
+ cdk_factory/stack_library/vpc/vpc_stack.py,sha256=UZuzb5uSOi4ghuLGPvsKqc3gwe6XI89jHV4WHX8MelA,11472
115
115
  cdk_factory/stack_library/websites/static_website_stack.py,sha256=hcdZQxyhupCy7n7UpNaX8egc2oI9TrssyOufj-oJuo8,10343
116
116
  cdk_factory/stages/websites/static_website_stage.py,sha256=X4fpKXkhb0zIbSHx3QyddBhVSLBryb1vf1Cg2fMTqog,755
117
117
  cdk_factory/templates/README.md,sha256=ATBEjG6beYvbEAdLtZ_8xnxgFD5X0cgZoI_6pToqH90,2679
@@ -129,8 +129,8 @@ cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJ
129
129
  cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
130
130
  cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
131
131
  cdk_factory/workload/workload_factory.py,sha256=mM8GU_5mKq_0OyK060T3JrUSUiGAcKf0eqNlT9mfaws,6028
132
- cdk_factory-0.15.1.dist-info/METADATA,sha256=QzCc3WHsPfsvYM3Jr7gxaRiRZ8emBOlgd-TnaJ2Rt7w,2451
133
- cdk_factory-0.15.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
134
- cdk_factory-0.15.1.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
135
- cdk_factory-0.15.1.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
136
- cdk_factory-0.15.1.dist-info/RECORD,,
132
+ cdk_factory-0.15.3.dist-info/METADATA,sha256=lsyCL4kq-zec5qwMBoMGoK5UWnJw3J1Gqri5Gg7ffLY,2451
133
+ cdk_factory-0.15.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
134
+ cdk_factory-0.15.3.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
135
+ cdk_factory-0.15.3.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
136
+ cdk_factory-0.15.3.dist-info/RECORD,,