File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,15 @@ module "labels" {
5454resource "aws_s3_bucket" "this" {
5555 count = " ${ module . enabled . value ? length (var. names ) : 0 } "
5656
57- bucket = " ${ module . labels . id [count . index ]} "
58- acl = " ${ var . public ? " public-read" : " private" } "
57+ bucket = " ${ module . labels . id [count . index ]} "
58+ acl = " ${ var . public ? " public-read" : " private" } "
59+ force_destroy = " ${ var . force_destroy } "
5960
6061 versioning {
6162 enabled = " ${ var . versioned } "
6263 }
6364
6465 # acceleration_status
65- # force_destroy = true
6666 # lifecycle_rule {}
6767 # logging {
6868 # target_bucket
@@ -71,6 +71,7 @@ resource "aws_s3_bucket" "this" {
7171 # region
7272 # request_payer
7373 # replication_configuration {}
74+ # server_side_encryption_configuration
7475 tags = " ${ module . labels . tags [count . index ]} "
7576}
7677
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ variable "enabled" {
8787 default = true
8888}
8989
90+ variable "force_destroy" {
91+ description = " Delete all objects in bucket on destroy"
92+ default = false
93+ }
94+
9095variable "principal" {
9196 description = " principal"
9297 default = " *"
You can’t perform that action at this time.
0 commit comments