Skip to content

Commit

Permalink
Add field. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbeloglazov authored Nov 7, 2022
1 parent ff3b078 commit 16ffb12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "random_string" "random" {

resource "aws_s3_bucket" "logs" {
bucket = lower("${random_string.random.keepers.name_prefix}-logs-${random_string.random.result}")
force_destroy = var.s3_bucket_force_destroy
tags = merge(
var.tags,
{
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ variable "s3_bucket_server_side_encryption_key" {
type = string
default = null
}

variable "s3_bucket_force_destroy" {
description = "(Optional) Sets force_destroy attribute on the generated S3 bucket."
type = bool
default = false
}

0 comments on commit 16ffb12

Please sign in to comment.