Merge pull request #882 from Hestia-Homes/deploy-fastapi-with-terraform

Deploy fastapi with terraform: use api_endpoint rather than invoke_url to get api domain
This commit is contained in:
Daniel Roth 2026-03-13 15:47:36 +00:00 committed by GitHub
commit 1f0be93b50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 9 deletions

View file

@ -44,11 +44,7 @@ module "cdn" {
# ---- API Gateway ----
{
origin_type = "api"
origin_domain_name = replace(
data.terraform_remote_state.fast_api.outputs.api_endpoint,
"https://",
""
)
origin_domain_name = data.terraform_remote_state.fast_api.outputs.api_endpoint
origin_id = "api-origin"
}
]

View file

@ -2,10 +2,10 @@ output "role_name" {
value = module.role.role_name
}
output "api_endpoint" {
value = aws_apigatewayv2_stage.this.invoke_url
}
output "domain_name" {
value = var.domain_name
}
output "api_endpoint" {
value = aws_apigatewayv2_stage.this.api_endpoint
}