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" {
54
54
resource "aws_s3_bucket" "this" {
55
55
count = " ${ module . enabled . value ? length (var. names ) : 0 } "
56
56
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 } "
59
60
60
61
versioning {
61
62
enabled = " ${ var . versioned } "
62
63
}
63
64
64
65
# acceleration_status
65
- # force_destroy = true
66
66
# lifecycle_rule {}
67
67
# logging {
68
68
# target_bucket
@@ -71,6 +71,7 @@ resource "aws_s3_bucket" "this" {
71
71
# region
72
72
# request_payer
73
73
# replication_configuration {}
74
+ # server_side_encryption_configuration
74
75
tags = " ${ module . labels . tags [count . index ]} "
75
76
}
76
77
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ variable "enabled" {
87
87
default = true
88
88
}
89
89
90
+ variable "force_destroy" {
91
+ description = " Delete all objects in bucket on destroy"
92
+ default = false
93
+ }
94
+
90
95
variable "principal" {
91
96
description = " principal"
92
97
default = " *"
You can’t perform that action at this time.
0 commit comments