revert to using invoke_url but correct the replace method

This commit is contained in:
Daniel Roth 2026-03-16 09:39:17 +00:00
parent 6e43824f94
commit 23df9442c9
3 changed files with 5 additions and 5 deletions

View file

@ -44,7 +44,7 @@ module "cdn" {
# ---- API Gateway ----
{
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"
}
]

View file

@ -2,6 +2,6 @@ output "domain_name" {
value = module.fastapi.domain_name
}
output "api_endpoint" {
value = module.fastapi.api_endpoint
output "invoke_url" {
value = module.fastapi.invoke_url
}

View file

@ -6,6 +6,6 @@ output "domain_name" {
value = var.domain_name
}
output "api_endpoint" {
value = aws_apigatewayv2_stage.this.api_endpoint
output "invoke_url" {
value = aws_apigatewayv2_stage.this.invoke_url
}