cdk-factory 0.18.11__py3-none-any.whl → 0.18.16__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.
Potentially problematic release.
This version of cdk-factory might be problematic. Click here for more details.
- cdk_factory/configurations/resources/ecs_service.py +24 -2
- cdk_factory/configurations/resources/route53.py +5 -0
- cdk_factory/interfaces/standardized_ssm_mixin.py +27 -0
- cdk_factory/stack_library/cloudfront/cloudfront_stack.py +30 -1
- cdk_factory/stack_library/ecs/ecs_service_stack.py +1 -1
- cdk_factory/stack_library/route53/route53_stack.py +243 -4
- cdk_factory/version.py +1 -1
- {cdk_factory-0.18.11.dist-info → cdk_factory-0.18.16.dist-info}/METADATA +1 -1
- {cdk_factory-0.18.11.dist-info → cdk_factory-0.18.16.dist-info}/RECORD +12 -12
- {cdk_factory-0.18.11.dist-info → cdk_factory-0.18.16.dist-info}/WHEEL +0 -0
- {cdk_factory-0.18.11.dist-info → cdk_factory-0.18.16.dist-info}/entry_points.txt +0 -0
- {cdk_factory-0.18.11.dist-info → cdk_factory-0.18.16.dist-info}/licenses/LICENSE +0 -0
|
@@ -83,14 +83,27 @@ class EcsServiceConfig:
|
|
|
83
83
|
"""Whether to assign public IP addresses"""
|
|
84
84
|
return self._config.get("assign_public_ip", False)
|
|
85
85
|
|
|
86
|
+
@property
|
|
87
|
+
def load_balancer_config(self) -> Dict[str, Any]:
|
|
88
|
+
"""Load balancer configuration"""
|
|
89
|
+
return self._config.get("load_balancer", {})
|
|
90
|
+
|
|
86
91
|
@property
|
|
87
92
|
def target_group_arns(self) -> List[str]:
|
|
88
93
|
"""Target group ARNs for load balancing"""
|
|
94
|
+
# Check if load_balancer config has target_group_arn
|
|
95
|
+
if self.load_balancer_config and self.load_balancer_config.get("target_group_arn"):
|
|
96
|
+
arn = self.load_balancer_config["target_group_arn"]
|
|
97
|
+
if arn and arn != "arn:aws:elasticloadbalancing:placeholder":
|
|
98
|
+
return [arn]
|
|
89
99
|
return self._config.get("target_group_arns", [])
|
|
90
100
|
|
|
91
101
|
@property
|
|
92
102
|
def container_port(self) -> int:
|
|
93
103
|
"""Container port for load balancer"""
|
|
104
|
+
# Check load_balancer config first
|
|
105
|
+
if self.load_balancer_config and self.load_balancer_config.get("container_port"):
|
|
106
|
+
return self.load_balancer_config["container_port"]
|
|
94
107
|
return self._config.get("container_port", 80)
|
|
95
108
|
|
|
96
109
|
@property
|
|
@@ -138,8 +151,17 @@ class EcsServiceConfig:
|
|
|
138
151
|
"""SSM parameter imports"""
|
|
139
152
|
# Check both nested and flat structures for backwards compatibility
|
|
140
153
|
if "ssm" in self._config and "imports" in self._config["ssm"]:
|
|
141
|
-
|
|
142
|
-
|
|
154
|
+
imports = self._config["ssm"]["imports"]
|
|
155
|
+
else:
|
|
156
|
+
imports = self.ssm.get("imports", {})
|
|
157
|
+
|
|
158
|
+
# Add load_balancer SSM imports if they exist
|
|
159
|
+
if self.load_balancer_config and "ssm" in self.load_balancer_config:
|
|
160
|
+
lb_ssm = self.load_balancer_config["ssm"]
|
|
161
|
+
if "imports" in lb_ssm:
|
|
162
|
+
imports.update(lb_ssm["imports"])
|
|
163
|
+
|
|
164
|
+
return imports
|
|
143
165
|
|
|
144
166
|
@property
|
|
145
167
|
def deployment_type(self) -> str:
|
|
@@ -106,3 +106,8 @@ class Route53Config:
|
|
|
106
106
|
def tags(self) -> Dict[str, str]:
|
|
107
107
|
"""Tags to apply to the Route53 resources"""
|
|
108
108
|
return self.__config.get("tags", {})
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def records(self) -> List[Dict[str, Any]]:
|
|
112
|
+
"""Records to create"""
|
|
113
|
+
return self.__config.get("records", [])
|
|
@@ -119,6 +119,7 @@ class StandardizedSsmMixin:
|
|
|
119
119
|
"""Export multiple resource values to SSM Parameter Store."""
|
|
120
120
|
params = {}
|
|
121
121
|
|
|
122
|
+
invalid_export_keys = []
|
|
122
123
|
# Only export parameters that are explicitly configured in ssm_exports
|
|
123
124
|
if not hasattr(config, 'ssm_exports') or not config.ssm_exports:
|
|
124
125
|
logger.debug("No SSM exports configured")
|
|
@@ -138,8 +139,17 @@ class StandardizedSsmMixin:
|
|
|
138
139
|
)
|
|
139
140
|
params[key] = param
|
|
140
141
|
else:
|
|
142
|
+
invalid_export_keys.append(key)
|
|
141
143
|
logger.warning(f"SSM export configured for '{key}' but no value found in resource_values")
|
|
142
144
|
|
|
145
|
+
if invalid_export_keys:
|
|
146
|
+
message = f"Export SSM Error\n🚨 SSM exports configured for '{invalid_export_keys}' but no values found in resource_values"
|
|
147
|
+
available_keys = list(resource_values.keys())
|
|
148
|
+
message = f"{message}\n✅ Available keys: {available_keys}"
|
|
149
|
+
message = f"{message}\n👉 Please update to the correct key or remove from the export list."
|
|
150
|
+
logger.warning(message)
|
|
151
|
+
raise ValueError(message)
|
|
152
|
+
|
|
143
153
|
return params
|
|
144
154
|
|
|
145
155
|
def normalize_resource_name(self, name: str, for_export: bool = False) -> str:
|
|
@@ -269,6 +279,23 @@ class StandardizedSsmMixin:
|
|
|
269
279
|
|
|
270
280
|
return exported_params
|
|
271
281
|
|
|
282
|
+
def resolve_ssm_value(self, scope: Construct, value: str, unique_id: str)-> str:
|
|
283
|
+
if isinstance(value, str) and value.startswith("{{ssm:") and value.endswith("}}"):
|
|
284
|
+
# Extract SSM parameter path
|
|
285
|
+
ssm_param_path = value[6:-2] # Remove {{ssm: and }}
|
|
286
|
+
|
|
287
|
+
# Import SSM parameter - this creates a token that resolves at deployment time
|
|
288
|
+
param = ssm.StringParameter.from_string_parameter_name(
|
|
289
|
+
scope=scope,
|
|
290
|
+
id=f"{unique_id}-env-{hash(ssm_param_path) % 10000}",
|
|
291
|
+
string_parameter_name=ssm_param_path
|
|
292
|
+
)
|
|
293
|
+
resolved_value = param.string_value
|
|
294
|
+
logger.info(f"Resolved SSM parameter {ssm_param_path}")
|
|
295
|
+
return resolved_value
|
|
296
|
+
else:
|
|
297
|
+
return value
|
|
298
|
+
|
|
272
299
|
def _resolve_ssm_import(self, import_value: Union[str, List[str]], import_key: str) -> Union[str, List[str]]:
|
|
273
300
|
"""
|
|
274
301
|
Resolve SSM import value with proper error handling and validation.
|
|
@@ -13,6 +13,7 @@ from aws_cdk import (
|
|
|
13
13
|
aws_cloudfront as cloudfront,
|
|
14
14
|
aws_cloudfront_origins as origins,
|
|
15
15
|
aws_certificatemanager as acm,
|
|
16
|
+
aws_route53 as route53,
|
|
16
17
|
aws_lambda as _lambda,
|
|
17
18
|
aws_ssm as ssm,
|
|
18
19
|
CfnOutput,
|
|
@@ -161,8 +162,36 @@ class CloudFrontStack(IStack):
|
|
|
161
162
|
logger.info(f"Using certificate from SSM: {ssm_param}")
|
|
162
163
|
return
|
|
163
164
|
|
|
165
|
+
# Create new certificate from domain name
|
|
166
|
+
domain_name = cert_config.get("domain_name")
|
|
167
|
+
if domain_name and self.cf_config.aliases:
|
|
168
|
+
# CloudFront certificates must be in us-east-1
|
|
169
|
+
if self.region != "us-east-1":
|
|
170
|
+
logger.warning(
|
|
171
|
+
f"Certificate creation requested but stack is in {self.region}. "
|
|
172
|
+
"CloudFront certificates must be created in us-east-1"
|
|
173
|
+
)
|
|
174
|
+
return
|
|
175
|
+
|
|
176
|
+
# Create the certificate
|
|
177
|
+
# Get hosted zone from SSM imports
|
|
178
|
+
hosted_zone_id = cert_config.get("hosted_zone_id")
|
|
179
|
+
hosted_zone = route53.HostedZone.from_hosted_zone_id(
|
|
180
|
+
self, "HostedZone", hosted_zone_id
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
self.certificate = acm.Certificate(
|
|
184
|
+
self,
|
|
185
|
+
"Certificate",
|
|
186
|
+
domain_name=domain_name,
|
|
187
|
+
subject_alternative_names=self.cf_config.aliases,
|
|
188
|
+
validation=acm.CertificateValidation.from_dns(hosted_zone=hosted_zone),
|
|
189
|
+
)
|
|
190
|
+
logger.info(f"Created new ACM certificate for domain: {domain_name}")
|
|
191
|
+
return
|
|
192
|
+
|
|
164
193
|
logger.warning(
|
|
165
|
-
"No certificate ARN provided - CloudFront will use default certificate"
|
|
194
|
+
"No certificate ARN or domain name provided - CloudFront will use default certificate"
|
|
166
195
|
)
|
|
167
196
|
|
|
168
197
|
def _create_origins(self) -> None:
|
|
@@ -563,7 +563,7 @@ class EcsServiceStack(IStack, VPCProviderMixin, StandardizedSsmMixin):
|
|
|
563
563
|
for param_key, param_name in ssm_imports.items():
|
|
564
564
|
if 'target_group' in param_key.lower() or 'tg' in param_key.lower():
|
|
565
565
|
try:
|
|
566
|
-
param_value = self.
|
|
566
|
+
param_value = self.get_ssm_imported_value(param_name)
|
|
567
567
|
if param_value and param_value.startswith('arn:'):
|
|
568
568
|
target_group_arns.append(param_value)
|
|
569
569
|
except Exception as e:
|
|
@@ -7,10 +7,15 @@ MIT License. See Project Root for the license information.
|
|
|
7
7
|
from typing import Dict, Any, List, Optional
|
|
8
8
|
|
|
9
9
|
import aws_cdk as cdk
|
|
10
|
-
from aws_cdk import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
from aws_cdk import (
|
|
11
|
+
aws_route53 as route53,
|
|
12
|
+
aws_route53_targets as targets,
|
|
13
|
+
aws_certificatemanager as acm,
|
|
14
|
+
aws_elasticloadbalancingv2 as elbv2,
|
|
15
|
+
aws_cloudfront as cloudfront,
|
|
16
|
+
Duration,
|
|
17
|
+
CfnOutput,
|
|
18
|
+
)
|
|
14
19
|
from aws_lambda_powertools import Logger
|
|
15
20
|
from constructs import Construct
|
|
16
21
|
|
|
@@ -35,6 +40,7 @@ class Route53Stack(IStack, StandardizedSsmMixin):
|
|
|
35
40
|
|
|
36
41
|
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
|
|
37
42
|
super().__init__(scope, id, **kwargs)
|
|
43
|
+
|
|
38
44
|
self.route53_config = None
|
|
39
45
|
self.stack_config = None
|
|
40
46
|
self.deployment = None
|
|
@@ -42,6 +48,7 @@ class Route53Stack(IStack, StandardizedSsmMixin):
|
|
|
42
48
|
self.hosted_zone = None
|
|
43
49
|
self.certificate = None
|
|
44
50
|
self.records = {}
|
|
51
|
+
self._distribution_cache = {} # Cache for reusing distributions
|
|
45
52
|
|
|
46
53
|
def build(self, stack_config: StackConfig, deployment: DeploymentConfig, workload: WorkloadConfig) -> None:
|
|
47
54
|
"""Build the Route53 stack"""
|
|
@@ -112,6 +119,232 @@ class Route53Stack(IStack, StandardizedSsmMixin):
|
|
|
112
119
|
return certificate
|
|
113
120
|
|
|
114
121
|
def _create_dns_records(self) -> None:
|
|
122
|
+
self._create_dns_records_old()
|
|
123
|
+
self._create_dns_records_new()
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _get_or_create_cloudfront_distribution(self, distribution_domain: str, distribution_id: str) -> cloudfront.Distribution:
|
|
127
|
+
"""Get or create a CloudFront distribution, reusing if already created"""
|
|
128
|
+
# Create a unique cache key from distribution domain and ID
|
|
129
|
+
cache_key = f"{distribution_domain}-{distribution_id}"
|
|
130
|
+
|
|
131
|
+
if cache_key not in self._distribution_cache:
|
|
132
|
+
# Create the distribution construct with a unique ID
|
|
133
|
+
unique_id = f"CF-{distribution_domain.replace('.', '-').replace('*', 'wildcard')}-{hash(cache_key) % 10000}"
|
|
134
|
+
distribution = cloudfront.Distribution.from_distribution_attributes(
|
|
135
|
+
self, unique_id,
|
|
136
|
+
domain_name=distribution_domain,
|
|
137
|
+
distribution_id=distribution_id
|
|
138
|
+
)
|
|
139
|
+
self._distribution_cache[cache_key] = distribution
|
|
140
|
+
logger.info(f"Created CloudFront distribution construct for {distribution_domain}")
|
|
141
|
+
|
|
142
|
+
return self._distribution_cache[cache_key]
|
|
143
|
+
|
|
144
|
+
def _create_dns_records_new(self) -> None:
|
|
145
|
+
"""Create DNS records based on configuration - generic implementation"""
|
|
146
|
+
|
|
147
|
+
missing_configurations = []
|
|
148
|
+
|
|
149
|
+
for record in self.route53_config.records:
|
|
150
|
+
record_name = record.get("name", "")
|
|
151
|
+
record_type = record.get("type", "")
|
|
152
|
+
|
|
153
|
+
if not record_name or not record_type:
|
|
154
|
+
message = f"Record missing name or type: {record}"
|
|
155
|
+
logger.warning(message)
|
|
156
|
+
missing_configurations.append(message)
|
|
157
|
+
continue
|
|
158
|
+
|
|
159
|
+
# Handle alias records
|
|
160
|
+
if "alias" in record:
|
|
161
|
+
alias_config = record["alias"]
|
|
162
|
+
target_type = alias_config.get("target_type", "")
|
|
163
|
+
target_value = alias_config.get("target_value", "")
|
|
164
|
+
hosted_zone_id = alias_config.get("hosted_zone_id", "")
|
|
165
|
+
|
|
166
|
+
unique_id = f"{record_name}-{record_type}"
|
|
167
|
+
# Handle SSM parameter references in target_value
|
|
168
|
+
target_value = self.resolve_ssm_value(self, target_value, unique_id=unique_id)
|
|
169
|
+
|
|
170
|
+
if not target_type or not target_value:
|
|
171
|
+
message = f"Alias record missing target_type or target_value: {record}"
|
|
172
|
+
logger.warning(message)
|
|
173
|
+
missing_configurations.append(message)
|
|
174
|
+
continue
|
|
175
|
+
|
|
176
|
+
# Create appropriate target based on type
|
|
177
|
+
alias_target = None
|
|
178
|
+
if target_type == "cloudfront":
|
|
179
|
+
# CloudFront distribution target
|
|
180
|
+
distribution_domain = target_value
|
|
181
|
+
distribution_id = alias_config.get("distribution_id", "")
|
|
182
|
+
if not distribution_id:
|
|
183
|
+
message = f"Alias record missing distribution_id: {record}"
|
|
184
|
+
logger.warning(message)
|
|
185
|
+
missing_configurations.append(message)
|
|
186
|
+
continue
|
|
187
|
+
|
|
188
|
+
# Get or create the distribution (reuses if already created)
|
|
189
|
+
distribution = self._get_or_create_cloudfront_distribution(distribution_domain, distribution_id)
|
|
190
|
+
alias_target = route53.RecordTarget.from_alias(
|
|
191
|
+
targets.CloudFrontTarget(distribution)
|
|
192
|
+
)
|
|
193
|
+
elif target_type == "loadbalancer" or target_type == "alb":
|
|
194
|
+
# Load Balancer target
|
|
195
|
+
alias_target = route53.RecordTarget.from_alias(
|
|
196
|
+
targets.LoadBalancerTarget(
|
|
197
|
+
elbv2.ApplicationLoadBalancer.from_load_balancer_attributes(
|
|
198
|
+
self, f"ALB-{record_name}",
|
|
199
|
+
load_balancer_dns_name=target_value,
|
|
200
|
+
load_balancer_canonical_hosted_zone_id=hosted_zone_id
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
)
|
|
204
|
+
elif target_type == "elbv2":
|
|
205
|
+
# Generic ELBv2 target
|
|
206
|
+
alias_target = route53.RecordTarget.from_alias(
|
|
207
|
+
targets.LoadBalancerTarget(
|
|
208
|
+
elbv2.ApplicationLoadBalancer.from_load_balancer_attributes(
|
|
209
|
+
self, f"ELB-{record_name}",
|
|
210
|
+
load_balancer_dns_name=target_value,
|
|
211
|
+
load_balancer_canonical_hosted_zone_id=hosted_zone_id
|
|
212
|
+
)
|
|
213
|
+
)
|
|
214
|
+
)
|
|
215
|
+
else:
|
|
216
|
+
message = f"Unsupported alias target type: {target_type}"
|
|
217
|
+
logger.warning(message)
|
|
218
|
+
missing_configurations.append(message)
|
|
219
|
+
continue
|
|
220
|
+
|
|
221
|
+
# Create the alias record
|
|
222
|
+
route53.ARecord(
|
|
223
|
+
self,
|
|
224
|
+
f"AliasRecord-{record_name}-{record_type}",
|
|
225
|
+
zone=self.hosted_zone,
|
|
226
|
+
record_name=record_name,
|
|
227
|
+
target=alias_target,
|
|
228
|
+
ttl=cdk.Duration.seconds(record.get("ttl", 300))
|
|
229
|
+
) if record_type == "A" else route53.AaaaRecord(
|
|
230
|
+
self,
|
|
231
|
+
f"AliasRecord-{record_name}-{record_type}",
|
|
232
|
+
zone=self.hosted_zone,
|
|
233
|
+
record_name=record_name,
|
|
234
|
+
target=alias_target,
|
|
235
|
+
ttl=cdk.Duration.seconds(record.get("ttl", 300))
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
# Handle standard records with values
|
|
239
|
+
elif "values" in record:
|
|
240
|
+
values = record["values"]
|
|
241
|
+
if not isinstance(values, list):
|
|
242
|
+
values = [values]
|
|
243
|
+
|
|
244
|
+
# Handle SSM parameter references in values
|
|
245
|
+
processed_values = []
|
|
246
|
+
for value in values:
|
|
247
|
+
if "{{ssm:" in str(value) and "}}" in str(value):
|
|
248
|
+
# Extract SSM parameter path from template like {{ssm:/path/to/parameter}}
|
|
249
|
+
ssm_path = str(value).split("{{ssm:")[1].split("}}")[0]
|
|
250
|
+
resolved_value = self.get_ssm_imported_value(ssm_path)
|
|
251
|
+
processed_values.append(resolved_value)
|
|
252
|
+
else:
|
|
253
|
+
processed_values.append(value)
|
|
254
|
+
|
|
255
|
+
values = processed_values
|
|
256
|
+
ttl = record.get("ttl", 300)
|
|
257
|
+
|
|
258
|
+
# Create standard record based on type
|
|
259
|
+
if record_type == "A":
|
|
260
|
+
route53.ARecord(
|
|
261
|
+
self,
|
|
262
|
+
f"Record-{record_name}",
|
|
263
|
+
zone=self.hosted_zone,
|
|
264
|
+
record_name=record_name,
|
|
265
|
+
target=route53.RecordTarget.from_ip_addresses(*values),
|
|
266
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
267
|
+
)
|
|
268
|
+
elif record_type == "AAAA":
|
|
269
|
+
route53.AaaaRecord(
|
|
270
|
+
self,
|
|
271
|
+
f"Record-{record_name}",
|
|
272
|
+
zone=self.hosted_zone,
|
|
273
|
+
record_name=record_name,
|
|
274
|
+
target=route53.RecordTarget.from_ip_addresses(*values),
|
|
275
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
276
|
+
)
|
|
277
|
+
elif record_type == "CNAME":
|
|
278
|
+
route53.CnameRecord(
|
|
279
|
+
self,
|
|
280
|
+
f"Record-{record_name}",
|
|
281
|
+
zone=self.hosted_zone,
|
|
282
|
+
record_name=record_name,
|
|
283
|
+
domain_name=values[0], # CNAME only supports single value
|
|
284
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
285
|
+
)
|
|
286
|
+
elif record_type == "MX":
|
|
287
|
+
# MX records need special handling for preference values
|
|
288
|
+
mx_targets = []
|
|
289
|
+
for value in values:
|
|
290
|
+
if isinstance(value, str) and " " in value:
|
|
291
|
+
preference, domain = value.split(" ", 1)
|
|
292
|
+
mx_targets.append(route53.MxRecordValue(
|
|
293
|
+
domain_name=domain.strip(),
|
|
294
|
+
preference=int(preference.strip())
|
|
295
|
+
))
|
|
296
|
+
else:
|
|
297
|
+
logger.warning(f"Invalid MX record format: {value}")
|
|
298
|
+
|
|
299
|
+
if mx_targets:
|
|
300
|
+
route53.MxRecord(
|
|
301
|
+
self,
|
|
302
|
+
f"Record-{record_name}",
|
|
303
|
+
zone=self.hosted_zone,
|
|
304
|
+
record_name=record_name,
|
|
305
|
+
values=mx_targets,
|
|
306
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
307
|
+
)
|
|
308
|
+
elif record_type == "TXT":
|
|
309
|
+
route53.TxtRecord(
|
|
310
|
+
self,
|
|
311
|
+
f"Record-{record_name}",
|
|
312
|
+
zone=self.hosted_zone,
|
|
313
|
+
record_name=record_name,
|
|
314
|
+
values=values,
|
|
315
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
316
|
+
)
|
|
317
|
+
elif record_type == "NS":
|
|
318
|
+
route53.NsRecord(
|
|
319
|
+
self,
|
|
320
|
+
f"Record-{record_name}",
|
|
321
|
+
zone=self.hosted_zone,
|
|
322
|
+
record_name=record_name,
|
|
323
|
+
values=values,
|
|
324
|
+
ttl=cdk.Duration.seconds(ttl)
|
|
325
|
+
)
|
|
326
|
+
else:
|
|
327
|
+
message = f"Unsupported record type: {record_type}"
|
|
328
|
+
logger.warning(message)
|
|
329
|
+
missing_configurations.append(message)
|
|
330
|
+
continue
|
|
331
|
+
|
|
332
|
+
else:
|
|
333
|
+
message = f"Record missing 'alias' or 'values' configuration: {record}"
|
|
334
|
+
logger.warning(message)
|
|
335
|
+
missing_configurations.append(message)
|
|
336
|
+
continue
|
|
337
|
+
|
|
338
|
+
if missing_configurations and len(missing_configurations) > 0:
|
|
339
|
+
# print all missing configurations
|
|
340
|
+
print("Missing configurations:")
|
|
341
|
+
for message in missing_configurations:
|
|
342
|
+
print(message)
|
|
343
|
+
|
|
344
|
+
messages = "\n".join(missing_configurations)
|
|
345
|
+
raise ValueError(f"Missing Configurations:\n{messages}")
|
|
346
|
+
|
|
347
|
+
def _create_dns_records_old(self) -> None:
|
|
115
348
|
"""Create DNS records based on configuration"""
|
|
116
349
|
# Create alias records
|
|
117
350
|
for alias_record in self.route53_config.aliases:
|
|
@@ -119,6 +352,12 @@ class Route53Stack(IStack, StandardizedSsmMixin):
|
|
|
119
352
|
target_type = alias_record.get("target_type", "")
|
|
120
353
|
target_value = alias_record.get("target_value", "")
|
|
121
354
|
|
|
355
|
+
# target value needs to handle SSM parameters
|
|
356
|
+
if "{{ssm:" in target_value and "}}" in target_value:
|
|
357
|
+
# Extract SSM parameter path from template like {{ssm:/path/to/parameter}}
|
|
358
|
+
ssm_path = target_value.split("{{ssm:")[1].split("}}")[0]
|
|
359
|
+
target_value = self.get_ssm_imported_value(ssm_path)
|
|
360
|
+
|
|
122
361
|
if not record_name or not target_type or not target_value:
|
|
123
362
|
continue
|
|
124
363
|
|
cdk_factory/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.18.
|
|
1
|
+
__version__ = "0.18.16"
|
|
@@ -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=
|
|
5
|
+
cdk_factory/version.py,sha256=u2VedG3riNPA57kZZvEOLXswrx3sIcK-W_Ka3KvPDzg,24
|
|
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=eJ3Pl3GWk1jVr_bYQaaWlw4_-ZiFGaiXllI_fOOX1i0,9323
|
|
@@ -32,7 +32,7 @@ cdk_factory/configurations/resources/docker.py,sha256=hUbuxkuhcQu9LnLX7I8_57eTmH
|
|
|
32
32
|
cdk_factory/configurations/resources/dynamodb.py,sha256=HsZMOaRwfuNPwKIzokeeE3f5zAQLTB5hRb_GzYq2ibg,2903
|
|
33
33
|
cdk_factory/configurations/resources/ecr.py,sha256=iJEtKqBT7vQU0LU4urIglraIR7cPZqp3HQBs_2An7kA,8303
|
|
34
34
|
cdk_factory/configurations/resources/ecs_cluster.py,sha256=mQYJu7SUPDl5E4dMR6HCPFoWvFA3RGIb0iMNn-K7LX8,3635
|
|
35
|
-
cdk_factory/configurations/resources/ecs_service.py,sha256=
|
|
35
|
+
cdk_factory/configurations/resources/ecs_service.py,sha256=bOWjVECd6Kbc5NGGSnDaopnKrjRsUfmaZ6-qrsmTs3Q,6468
|
|
36
36
|
cdk_factory/configurations/resources/exisiting.py,sha256=EVOLnkB-DGfTlmDgyQ5DD5k2zYfpFxqI3gugDR7mifI,478
|
|
37
37
|
cdk_factory/configurations/resources/lambda_edge.py,sha256=MjmiwDkys4aoRvDQhH3MT6BgeShzJXNWL7761HJrLtQ,3404
|
|
38
38
|
cdk_factory/configurations/resources/lambda_function.py,sha256=VENZ9-ABJ5mjcN8J8wdLH4KHDYr1kWO0iFDH0B2mJXA,14659
|
|
@@ -44,7 +44,7 @@ cdk_factory/configurations/resources/rds.py,sha256=ap2sbrcPsesfaPSluzyomGgT70_PU
|
|
|
44
44
|
cdk_factory/configurations/resources/resource_mapping.py,sha256=cwv3n63RJ6E59ErsmSTdkW4i-g8huhHtKI0ExbRhJxA,2182
|
|
45
45
|
cdk_factory/configurations/resources/resource_naming.py,sha256=VE9S2cpzp11qqPL2z1sX79wXH0o1SntO2OG74nEmWC8,5508
|
|
46
46
|
cdk_factory/configurations/resources/resource_types.py,sha256=1WQHyDoErb-M-tETZZzyLDtbq_jdC85-I403dM48pgE,2317
|
|
47
|
-
cdk_factory/configurations/resources/route53.py,sha256=
|
|
47
|
+
cdk_factory/configurations/resources/route53.py,sha256=u63kw9cLBdOQrvxnULmopFqiArIYNvoWhrILNWvhD7w,3599
|
|
48
48
|
cdk_factory/configurations/resources/route53_hosted_zone.py,sha256=qjEYPCSxSOx5blr9EULv892ezxkCs--yrLa1ngWbyXM,880
|
|
49
49
|
cdk_factory/configurations/resources/rum.py,sha256=KgC2Mxhtr5XrICVXdgOXmxYp0GKu9lBs7izfG-Re9Ck,5294
|
|
50
50
|
cdk_factory/configurations/resources/s3.py,sha256=kLY0XNCfErNYnOwekefFJxEJ_AKPifA-wSaaNczDp94,6036
|
|
@@ -66,7 +66,7 @@ cdk_factory/constructs/sqs/policies/sqs_policies.py,sha256=4p0G8G-fqNKSr68I55fvq
|
|
|
66
66
|
cdk_factory/interfaces/istack.py,sha256=3xqGw5kNTt_KeLHdMxI7rIR0YORqcWQOqsacmDlTAv0,1167
|
|
67
67
|
cdk_factory/interfaces/live_ssm_resolver.py,sha256=3FIr9a02SXqZmbFs3RT0WxczWEQR_CF7QSt7kWbDrVE,8163
|
|
68
68
|
cdk_factory/interfaces/networked_stack_mixin.py,sha256=CtWT7Nhy73f0goQQG02jG7lsEucq5OrtZ0ltrp7XTFA,2884
|
|
69
|
-
cdk_factory/interfaces/standardized_ssm_mixin.py,sha256=
|
|
69
|
+
cdk_factory/interfaces/standardized_ssm_mixin.py,sha256=kbl8fTDSBBSUARnKjruYB7KEgsw1Xns7g6fI5Jh8Vio,25763
|
|
70
70
|
cdk_factory/interfaces/vpc_provider_mixin.py,sha256=Kj0mmZd54NINprixJLs8zL-WWiSd0AQBtGdwNg8cz14,8207
|
|
71
71
|
cdk_factory/lambdas/health_handler.py,sha256=dd40ykKMxWCFEIyp2ZdQvAGNjw_ylI9CSm1N24Hp2ME,196
|
|
72
72
|
cdk_factory/lambdas/edge/ip_gate/handler.py,sha256=gUevgX462mqGYddtQIyJ1-Jk3oXhFmbmd46jlqjai9E,10657
|
|
@@ -91,7 +91,7 @@ cdk_factory/stack_library/aws_lambdas/lambda_stack.py,sha256=SFbBPvvCopbyiuYtq-O
|
|
|
91
91
|
cdk_factory/stack_library/buckets/README.md,sha256=XkK3UNVtRLE7NtUvbhCOBBYUYi8hlrrSaI1s3GJVrqI,78
|
|
92
92
|
cdk_factory/stack_library/buckets/bucket_stack.py,sha256=SLoZqSffAqmeBBEVUQg54D_8Ad5UKdkjEAmKAVgAqQo,1778
|
|
93
93
|
cdk_factory/stack_library/cloudfront/__init__.py,sha256=Zfx50q4xIJ4ZEoVIzUBDTKbRE9DKDM6iyVIFhtQXvww,153
|
|
94
|
-
cdk_factory/stack_library/cloudfront/cloudfront_stack.py,sha256=
|
|
94
|
+
cdk_factory/stack_library/cloudfront/cloudfront_stack.py,sha256=yuNs_W5b85JSXXv6_17OAD-e-wUitDPrRlZV4bxjChU,31459
|
|
95
95
|
cdk_factory/stack_library/code_artifact/code_artifact_stack.py,sha256=k831b_fAFoXSiwj5cencnCQzUSeuKIUyVCp6Ev_TMgI,6274
|
|
96
96
|
cdk_factory/stack_library/cognito/cognito_stack.py,sha256=3tjKCNcIwXZn7fd4EDQdY6H9m6CnZohI4uTQ4TpacRQ,25327
|
|
97
97
|
cdk_factory/stack_library/dynamodb/dynamodb_stack.py,sha256=-_Ij1zXIxUuZIWgdevam_1vD3LEJ6pFs9U0hmw0KwIw,6743
|
|
@@ -99,7 +99,7 @@ cdk_factory/stack_library/ecr/README.md,sha256=xw2wPx9WN03Y4BBwqvbi9lAFGNyaD1FUN
|
|
|
99
99
|
cdk_factory/stack_library/ecr/ecr_stack.py,sha256=KLbd5WN5-ZiojsS5wJ4PX-tIL0cCylCSvXjO6sVrgWY,2102
|
|
100
100
|
cdk_factory/stack_library/ecs/__init__.py,sha256=o5vGDtD_h-gVXb3-Ysr8xUNpEcMsnmMVgZv2Pupcdow,219
|
|
101
101
|
cdk_factory/stack_library/ecs/ecs_cluster_stack.py,sha256=sAPTLU5CAwMoLTW_pNy_cd0OtVkfDR7IxxsSq5AE0yo,12091
|
|
102
|
-
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=
|
|
102
|
+
cdk_factory/stack_library/ecs/ecs_service_stack.py,sha256=NWBSB-0GTWa0rHDO2o2KTIqvWDCR93CV9ghU-0Xm7Dk,27408
|
|
103
103
|
cdk_factory/stack_library/lambda_edge/__init__.py,sha256=ByBJ_CWdc4UtTmFBZH-6pzBMNkjkdtE65AmnB0Fs6lM,156
|
|
104
104
|
cdk_factory/stack_library/lambda_edge/lambda_edge_stack.py,sha256=C_h2Xb2_zaCGiw5otbeSozOLNbxaciMLo8FX_TQOAlw,16409
|
|
105
105
|
cdk_factory/stack_library/load_balancer/__init__.py,sha256=wZpKw2OecLJGdF5mPayCYAEhu2H3c2gJFFIxwXftGDU,52
|
|
@@ -109,7 +109,7 @@ cdk_factory/stack_library/monitoring/monitoring_stack.py,sha256=N_1YvEXE7fboH_S3
|
|
|
109
109
|
cdk_factory/stack_library/rds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
110
|
cdk_factory/stack_library/rds/rds_stack.py,sha256=5dk_SUMkbnSalD2AKI0c-LrKbaHB4OOgq6DmRa4QMbM,15377
|
|
111
111
|
cdk_factory/stack_library/route53/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
|
-
cdk_factory/stack_library/route53/route53_stack.py,sha256=
|
|
112
|
+
cdk_factory/stack_library/route53/route53_stack.py,sha256=4OeJxBTchcXHZznUQ6IIMuFmbsWtOoR0cIfDIIdHs8o,19624
|
|
113
113
|
cdk_factory/stack_library/rum/__init__.py,sha256=gUrWQdzd4rZ2J0YzAQC8PsEGAS7QgyYjB2ZCUKWasy4,90
|
|
114
114
|
cdk_factory/stack_library/rum/rum_stack.py,sha256=c67m0Jbyx8hx9TTx9TBBhZMDqtSK7QCqKx_Ec1t8LgY,14067
|
|
115
115
|
cdk_factory/stack_library/security_group/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -136,8 +136,8 @@ cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITE
|
|
|
136
136
|
cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
|
|
137
137
|
cdk_factory/validation/config_validator.py,sha256=Pb0TkLiPFzUplBOgMorhRCVm08vEzZhRU5xXCDTa5CA,17602
|
|
138
138
|
cdk_factory/workload/workload_factory.py,sha256=yDI3cRhVI5ELNDcJPLpk9UY54Uind1xQoV3spzT4z7E,6068
|
|
139
|
-
cdk_factory-0.18.
|
|
140
|
-
cdk_factory-0.18.
|
|
141
|
-
cdk_factory-0.18.
|
|
142
|
-
cdk_factory-0.18.
|
|
143
|
-
cdk_factory-0.18.
|
|
139
|
+
cdk_factory-0.18.16.dist-info/METADATA,sha256=_5MumwvtcwxpK7-7j2fkX349pq9kshbn49bFqaC7RLU,2452
|
|
140
|
+
cdk_factory-0.18.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
141
|
+
cdk_factory-0.18.16.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
|
|
142
|
+
cdk_factory-0.18.16.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
|
|
143
|
+
cdk_factory-0.18.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|