Skip to content

Commit 256710a

Browse files
CCM-14046 Enable API data traces in nonprod envs (#359)
1 parent c73482c commit 256710a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

infrastructure/terraform/components/api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ No requirements.
1717
| <a name="input_core_environment"></a> [core\_environment](#input\_core\_environment) | Environment of Core | `string` | `"prod"` | no |
1818
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
1919
| <a name="input_disable_gateway_execute_endpoint"></a> [disable\_gateway\_execute\_endpoint](#input\_disable\_gateway\_execute\_endpoint) | Disable the execution endpoint for the API Gateway | `bool` | `true` | no |
20+
| <a name="input_enable_api_data_trace"></a> [enable\_api\_data\_trace](#input\_enable\_api\_data\_trace) | Enable API Gateway data trace logging | `bool` | `false` | no |
2021
| <a name="input_enable_event_cache"></a> [enable\_event\_cache](#input\_enable\_event\_cache) | Enable caching of events to an S3 bucket | `bool` | `false` | no |
2122
| <a name="input_enable_sns_delivery_logging"></a> [enable\_sns\_delivery\_logging](#input\_enable\_sns\_delivery\_logging) | Enable SNS Delivery Failure Notifications | `bool` | `false` | no |
2223
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |

infrastructure/terraform/components/api/api_gateway_method_settings.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ resource "aws_api_gateway_method_settings" "main" {
66
settings {
77
metrics_enabled = true
88
logging_level = "INFO"
9-
data_trace_enabled = true
9+
data_trace_enabled = var.enable_api_data_trace
1010
}
1111
}

infrastructure/terraform/components/api/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,9 @@ variable "sns_success_logging_sample_percent" {
181181
description = "Enable SNS Delivery Successful Sample Percentage"
182182
default = 0
183183
}
184+
185+
variable "enable_api_data_trace" {
186+
type = bool
187+
description = "Enable API Gateway data trace logging"
188+
default = false
189+
}

0 commit comments

Comments
 (0)