Skip to content

Access logs can't be disabled #115

@benkeil

Description

@benkeil

Description

We want to deactivate the access logging.

  • ✋ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 5.1.1

  • Terraform version:
    Terraform v1.9.4
    on darwin_arm64

Reproduction Code [Required]

dynamic "access_log_settings" {
  for_each = length(var.stage_access_log_settings) > 0 ? [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
    format          = coalesce(access_log_settings.value.format, local.default_log_format)
  }
}

The Statement length(var.stage_access_log_settings) will always return 9, since the object has properties with default values and so gets instantiated.

Expected behavior

Add a variable to turn access logging off.

Actual behavior

Terminal Output Screenshot(s)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions