Skip to content

Commit

Permalink
Add log_retention_days parameter to cloudwatch (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
datalek authored Jan 10, 2024
1 parent afc6693 commit 3104837
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .infrastructure/55_cognito.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module "cognito_custom_message_function" {
create_package = false
local_existing_package = local.cognito_lambda_functions_artifact_path
create_current_version_allowed_triggers = false
cloudwatch_logs_retention_in_days = var.log_retention_days

environment_variables = local.lambda_env_variables

Expand All @@ -47,6 +48,7 @@ module "cognito_post_confirmation_function" {
create_package = false
local_existing_package = local.cognito_lambda_functions_artifact_path
create_current_version_allowed_triggers = false
cloudwatch_logs_retention_in_days = var.log_retention_days

environment_variables = local.lambda_env_variables

Expand Down Expand Up @@ -79,6 +81,7 @@ module "cognito_define_auth_challenge_function" {
create_package = false
local_existing_package = local.cognito_lambda_functions_artifact_path
create_current_version_allowed_triggers = false
cloudwatch_logs_retention_in_days = var.log_retention_days

environment_variables = local.lambda_env_variables

Expand All @@ -102,6 +105,7 @@ module "cognito_create_auth_challenge_function" {
create_package = false
local_existing_package = local.cognito_lambda_functions_artifact_path
create_current_version_allowed_triggers = false
cloudwatch_logs_retention_in_days = var.log_retention_days

environment_variables = local.lambda_env_variables

Expand Down Expand Up @@ -134,6 +138,7 @@ module "cognito_verify_auth_challenge_function" {
create_package = false
local_existing_package = local.cognito_lambda_functions_artifact_path
create_current_version_allowed_triggers = false
cloudwatch_logs_retention_in_days = var.log_retention_days

environment_variables = local.lambda_env_variables

Expand Down
6 changes: 6 additions & 0 deletions .infrastructure/98_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ variable "use_custom_certificate" {
description = "Enable CDN https support with a custom certificate instead using the default one"
default = true
}

variable "log_retention_days" {
type = number
description = "The number of days logs should be retained. Default is 90 days."
default = 90
}

0 comments on commit 3104837

Please sign in to comment.