Skip to content

Commit

Permalink
set force_destroy variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ashle001 committed Oct 26, 2020
1 parent 55b1a1d commit 0109b00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ locals {
resource "aws_s3_bucket" "this" {
bucket = var.bucket_name
acl = "private"
force_destroy = false
force_destroy = var.force_destroy

server_side_encryption_configuration {
rule {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ variable "allowed_endpoints" {
default = [ ]
}

variable "force_destroy" {
description = "Protect or delete bucket"
type = string
default = "false"
}

0 comments on commit 0109b00

Please sign in to comment.