Skip to content

Conversation

@sheilman16
Copy link
Contributor

Repeat of PR 36 with requested updates from main and to readme.

what

  • Added variable data_trace_enabled to the aws_api_gateway_method_settings resource
  • This change allows for configuration of CloudWatch logging setting "Full Request and Response Logs" available in the AWS UI. [2]

why

The variable logging_level controls CloudWatch log setting in the AWS UI for OFF, INFO, and ERROR, but doesn't include an option for "Full Request and Response Logs". In the AWS UI for API GW, there's an additional option, "Full Request and Response Logs", as shown in the screenshot:

image

According to terraform documentation, the variable data_trace_enabled = true is required in conjunction with logging_level = "INFO" to enable "Full Request and Response Logs". This is added to the aws_api_gateway_method_settings resource in the settings code block [2]:

settings {
    logging_level      = "INFO"
    metrics_enabled    = true
    data_trace_enabled = true
  }

references

[1] Terraform resource:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_method_settings

[2] Closed Issue with Terraform citing solution
hashicorp/terraform-provider-aws#35863 (comment)

@Gowiem
Copy link
Member

Gowiem commented May 10, 2024

/terratest

@Gowiem Gowiem self-requested a review May 10, 2024 18:37
@Gowiem Gowiem self-assigned this May 10, 2024
Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Gowiem Gowiem enabled auto-merge (squash) May 10, 2024 18:38
@mergify mergify bot removed the triage Needs triage label May 10, 2024
@Gowiem
Copy link
Member

Gowiem commented May 10, 2024

@sheilman16 good stuff -- Thanks for the contribution + circling back around to this work! 👍

@Gowiem Gowiem added enhancement New feature or request minor New features that do not break anything labels May 10, 2024
@Gowiem Gowiem merged commit 6bc513a into cloudposse:main May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor New features that do not break anything

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants