From 23df9442c9868789aa9a7cb117eaa1df03de7d23 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 16 Mar 2026 09:39:17 +0000 Subject: [PATCH] revert to using invoke_url but correct the replace method --- infrastructure/terraform/cdn/main.tf | 2 +- infrastructure/terraform/lambda/fast-api/outputs.tf | 4 ++-- .../terraform/modules/lambda_with_api_gateway/outputs.tf | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infrastructure/terraform/cdn/main.tf b/infrastructure/terraform/cdn/main.tf index ce1e20e5..7ef58e19 100644 --- a/infrastructure/terraform/cdn/main.tf +++ b/infrastructure/terraform/cdn/main.tf @@ -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" } ] diff --git a/infrastructure/terraform/lambda/fast-api/outputs.tf b/infrastructure/terraform/lambda/fast-api/outputs.tf index d3d9dbaa..c9fc6f86 100644 --- a/infrastructure/terraform/lambda/fast-api/outputs.tf +++ b/infrastructure/terraform/lambda/fast-api/outputs.tf @@ -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 } \ No newline at end of file diff --git a/infrastructure/terraform/modules/lambda_with_api_gateway/outputs.tf b/infrastructure/terraform/modules/lambda_with_api_gateway/outputs.tf index e3b291a7..eae0f7d7 100644 --- a/infrastructure/terraform/modules/lambda_with_api_gateway/outputs.tf +++ b/infrastructure/terraform/modules/lambda_with_api_gateway/outputs.tf @@ -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 } \ No newline at end of file