Skip to content

Commit 1f86e05

Browse files
authored
Merge branch 'master' into patch-1
2 parents d3310d7 + 36d3fa4 commit 1f86e05

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [5.6.0](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/compare/v5.5.0...v5.6.0) (2025-08-25)
6+
7+
8+
### Features
9+
10+
* Add skip_destroy argument in the aws_s3_bucket_public_access_bl… ([#352](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/issues/352)) ([8833269](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/commit/8833269e206a62030a259032cf039db5333e8160))
11+
512
## [5.5.0](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/compare/v5.4.0...v5.5.0) (2025-08-20)
613

714

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ No modules.
276276
| <a name="input_request_payer"></a> [request\_payer](#input\_request\_payer) | (Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information. | `string` | `null` | no |
277277
| <a name="input_restrict_public_buckets"></a> [restrict\_public\_buckets](#input\_restrict\_public\_buckets) | Whether Amazon S3 should restrict public bucket policies for this bucket. | `bool` | `true` | no |
278278
| <a name="input_server_side_encryption_configuration"></a> [server\_side\_encryption\_configuration](#input\_server\_side\_encryption\_configuration) | Map containing server-side encryption configuration. | `any` | `{}` | no |
279+
| <a name="input_skip_destroy_public_access_block"></a> [skip\_destroy\_public\_access\_block](#input\_skip\_destroy\_public\_access\_block) | Whether to skip destroying the S3 Bucket Public Access Block configuration when destroying the bucket. Only used if `public_access_block` is set to true. | `bool` | `true` | no |
279280
| <a name="input_tags"></a> [tags](#input\_tags) | (Optional) A mapping of tags to assign to the bucket. | `map(string)` | `{}` | no |
280281
| <a name="input_transition_default_minimum_object_size"></a> [transition\_default\_minimum\_object\_size](#input\_transition\_default\_minimum\_object\_size) | The default minimum object size behavior applied to the lifecycle configuration. Valid values: all\_storage\_classes\_128K (default), varies\_by\_storage\_class | `string` | `null` | no |
281282
| <a name="input_type"></a> [type](#input\_type) | Bucket type. Valid values: `Directory` | `string` | `"Directory"` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ resource "aws_s3_bucket_public_access_block" "this" {
11481148
block_public_policy = var.block_public_policy
11491149
ignore_public_acls = var.ignore_public_acls
11501150
restrict_public_buckets = var.restrict_public_buckets
1151+
skip_destroy = var.skip_destroy_public_access_block
11511152
}
11521153

11531154
resource "aws_s3_bucket_ownership_controls" "this" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ variable "block_public_policy" {
328328
default = true
329329
}
330330

331+
variable "skip_destroy_public_access_block" {
332+
description = "Whether to skip destroying the S3 Bucket Public Access Block configuration when destroying the bucket. Only used if `public_access_block` is set to true."
333+
type = bool
334+
default = true
335+
}
336+
331337
variable "ignore_public_acls" {
332338
description = "Whether Amazon S3 should ignore public ACLs for this bucket."
333339
type = bool

wrappers/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module "wrapper" {
6868
request_payer = try(each.value.request_payer, var.defaults.request_payer, null)
6969
restrict_public_buckets = try(each.value.restrict_public_buckets, var.defaults.restrict_public_buckets, true)
7070
server_side_encryption_configuration = try(each.value.server_side_encryption_configuration, var.defaults.server_side_encryption_configuration, {})
71+
skip_destroy_public_access_block = try(each.value.skip_destroy_public_access_block, var.defaults.skip_destroy_public_access_block, true)
7172
tags = try(each.value.tags, var.defaults.tags, {})
7273
transition_default_minimum_object_size = try(each.value.transition_default_minimum_object_size, var.defaults.transition_default_minimum_object_size, null)
7374
type = try(each.value.type, var.defaults.type, "Directory")

0 commit comments

Comments
 (0)