Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ locals {
is_websocket = var.protocol_type == "WEBSOCKET"

create_routes_and_integrations = var.create && var.create_routes_and_integrations
disable_execute_api_endpoint = var.disable_execute_api_endpoint != null ? var.disable_execute_api_endpoint : local.is_http && local.create_domain_name
}

################################################################################
Expand Down Expand Up @@ -31,7 +32,7 @@ resource "aws_apigatewayv2_api" "this" {
credentials_arn = local.is_http ? var.credentials_arn : null
description = var.description
# https://docs.aws.amazon.com/apigateway/latest/developerguide/rest-api-disable-default-endpoint.html
disable_execute_api_endpoint = local.is_http && local.create_domain_name ? true : var.disable_execute_api_endpoint
disable_execute_api_endpoint = local.disable_execute_api_endpoint
fail_on_warnings = local.is_http ? var.fail_on_warnings : null
name = var.name
protocol_type = var.protocol_type
Expand Down
Loading