Skip to content

Commit b43e2ea

Browse files
authored
fix: Correct default value check on optional maps (#116)
1 parent 425fdd7 commit b43e2ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ resource "aws_apigatewayv2_stage" "this" {
324324
api_id = aws_apigatewayv2_api.this[0].id
325325

326326
dynamic "access_log_settings" {
327-
for_each = length(var.stage_access_log_settings) > 0 ? [var.stage_access_log_settings] : []
327+
for_each = var.stage_access_log_settings != null ? [var.stage_access_log_settings] : []
328328

329329
content {
330330
destination_arn = access_log_settings.value.create_log_group ? aws_cloudwatch_log_group.this["this"].arn : access_log_settings.value.destination_arn
@@ -336,7 +336,7 @@ resource "aws_apigatewayv2_stage" "this" {
336336
client_certificate_id = local.is_websocket ? var.stage_client_certificate_id : null
337337

338338
dynamic "default_route_settings" {
339-
for_each = length(var.stage_default_route_settings) > 0 ? [var.stage_default_route_settings] : []
339+
for_each = var.stage_default_route_settings != null ? [var.stage_default_route_settings] : []
340340

341341
content {
342342
data_trace_enabled = local.is_websocket ? default_route_settings.value.data_trace_enabled : null

0 commit comments

Comments
 (0)