-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: include stage subdomain in cloudfront distribution #237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some discussion comments but no changes requested.
), | ||
cache_policy=cf.CachePolicy.CACHING_DISABLED, | ||
), | ||
certificate=domain_cert, | ||
domain_names=[veda_route_settings.domain_hosted_zone_name] | ||
domain_names=[f"{stage}.{veda_route_settings.domain_hosted_zone_name}"] | ||
if veda_route_settings.domain_hosted_zone_name | ||
else None, | ||
additional_behaviors={ | ||
"/api/stac*": cf.BehaviorOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this additional behaviors in the last PR, maybe we can drop a TODO here to make this configurable in the condition that a path prefex is used like f"{veda_route_settings.stac_path_prefix}*": cf.BehaviorOptions(...
. I think we can work on that after using things for a while though, to see what our needs are
@@ -89,7 +90,7 @@ def __init__( | |||
] = aws_apigatewayv2_alpha.ParameterMapping().overwrite_header( | |||
"host", | |||
aws_apigatewayv2_alpha.MappingValue( | |||
veda_raster_settings.domain_hosted_zone_name | |||
f"{stage}.{veda_raster_settings.domain_hosted_zone_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment for future work: maybe we can add a method in the api config files to add a stage subdomain for all non-prod stages? We don't need that now so it's just something to think about.
The cloudfront distribution includes the
stage
env as the subdomain:{stage}.{domain_hosted_zone_name}.com