UPD: added force_destroy support tp s3 bucket module
This commit is contained in:
parent
b0e174bcfa
commit
436b799ff1
@ -1,5 +1,6 @@
|
||||
resource "aws_s3_bucket" "this" {
|
||||
bucket = var.bucket_name
|
||||
bucket = var.bucket_name
|
||||
force_destroy = var.bucket_force_destroy
|
||||
}
|
||||
|
||||
resource "aws_s3_bucket_public_access_block" "block_public_access" {
|
||||
@ -20,7 +21,7 @@ data "aws_iam_policy_document" "bucket_policy" {
|
||||
actions = ["s3:*"]
|
||||
effect = "Deny"
|
||||
principals {
|
||||
type = "*"
|
||||
type = "*"
|
||||
identifiers = ["*"]
|
||||
}
|
||||
resources = [
|
||||
|
@ -3,6 +3,12 @@ variable "bucket_name" {
|
||||
description = "Name of bucket"
|
||||
}
|
||||
|
||||
variable bucket_force_destroy {
|
||||
type = bool
|
||||
default = false
|
||||
description = "Indicates all objects should be deleted from the bucket when the bucket is destroyed."
|
||||
}
|
||||
|
||||
variable "bucket_policy_json" {
|
||||
type = string
|
||||
default = "{}"
|
||||
|
Loading…
Reference in New Issue
Block a user