diff --git a/README.md b/README.md index f759016..de1c588 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ module "bootstrap" { | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | account\_alias | The desired AWS account alias. | `string` | n/a | yes | +| log\_retention | Log retention of access logs of state bucket. | `number` | `90` | no | | region | AWS region. | `string` | n/a | yes | ## Outputs diff --git a/main.tf b/main.tf index 5a9e2be..3b33d91 100644 --- a/main.tf +++ b/main.tf @@ -33,9 +33,10 @@ module "terraform_state_bucket_logs" { source = "trussworks/logs/aws" version = "~> 8.0.1" - region = var.region - s3_bucket_name = local.logging_bucket - default_allow = false + region = var.region + s3_bucket_name = local.logging_bucket + default_allow = false + s3_log_bucket_retention = var.log_retention } # diff --git a/variables.tf b/variables.tf index c3b3ae2..668c67a 100644 --- a/variables.tf +++ b/variables.tf @@ -7,3 +7,9 @@ variable "account_alias" { description = "The desired AWS account alias." type = string } + +variable "log_retention" { + description = "Log retention of access logs of state bucket." + default = 90 + type = number +}