Skip to content

Commit

Permalink
fix: Correct default value check on optional maps
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Aug 8, 2024
1 parent 425fdd7 commit 0370817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ resource "aws_apigatewayv2_stage" "this" {
api_id = aws_apigatewayv2_api.this[0].id

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

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

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

content {
data_trace_enabled = local.is_websocket ? default_route_settings.value.data_trace_enabled : null
Expand Down

0 comments on commit 0370817

Please sign in to comment.