Skip to content

Commit cdefb54

Browse files
zaro0508Copilot
andauthored
Update src/service_stack.py
handle error when HTTPS is requested but no certificate ARN is provided. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent af66340 commit cdefb54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/service_stack.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ def __init__(
230230
) -> None:
231231
super().__init__(scope, construct_id, vpc, cluster, props, **kwargs)
232232

233+
if enable_https and not certificate_arn:
234+
raise ValueError(
235+
"enable_https is True but certificate_arn is None. Please provide a valid certificate ARN to enable HTTPS."
236+
)
233237
if enable_https and certificate_arn:
234238
# -------------------
235239
# ACM Certificate for HTTPS

0 commit comments

Comments
 (0)