mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Merge pull request #885 from Hestia-Homes/main
Deploy fastapi with terraform: Correct domain name passed to cloudfront
This commit is contained in:
commit
50eb07fa7a
3 changed files with 5 additions and 5 deletions
|
|
@ -44,7 +44,7 @@ module "cdn" {
|
||||||
# ---- API Gateway ----
|
# ---- API Gateway ----
|
||||||
{
|
{
|
||||||
origin_type = "api"
|
origin_type = "api"
|
||||||
origin_domain_name = data.terraform_remote_state.fast_api.outputs.api_endpoint
|
origin_domain_name = replace(data.terraform_remote_state.fast_api.outputs.invoke_url, "/^https?://([^/]*).*/", "$1")
|
||||||
origin_id = "api-origin"
|
origin_id = "api-origin"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@ output "domain_name" {
|
||||||
value = module.fastapi.domain_name
|
value = module.fastapi.domain_name
|
||||||
}
|
}
|
||||||
|
|
||||||
output "api_endpoint" {
|
output "invoke_url" {
|
||||||
value = module.fastapi.api_endpoint
|
value = module.fastapi.invoke_url
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,6 @@ output "domain_name" {
|
||||||
value = var.domain_name
|
value = var.domain_name
|
||||||
}
|
}
|
||||||
|
|
||||||
output "api_endpoint" {
|
output "invoke_url" {
|
||||||
value = aws_apigatewayv2_stage.this.api_endpoint
|
value = aws_apigatewayv2_stage.this.invoke_url
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue