diff --git a/main.tf b/main.tf index a22a944..00d4c9f 100644 --- a/main.tf +++ b/main.tf @@ -9,7 +9,7 @@ terraform { module "apigw" { source = "armorfret/apigw-lambda/aws" - version = "0.8.0" + version = "0.9.0" source_bucket = var.lambda_bucket source_version = var.lambda_version @@ -36,6 +36,8 @@ module "apigw" { } auth_access_policy_document = data.aws_iam_policy_document.auth_lambda_perms.json auth_ttl = 0 + + cloudwatch_retention_in_days = var.cloudwatch_retention_in_days } module "publish_user" { diff --git a/variables.tf b/variables.tf index 234da9e..d2dc094 100644 --- a/variables.tf +++ b/variables.tf @@ -44,3 +44,9 @@ variable "hostname" { description = "Hostname to use for the site" type = string } + +variable "cloudwatch_retention_in_days" { + description = "Days to retain cloudwatch logs" + type = number + default = 30 +}