Skip to content

Commit 2a25737

Browse files
feat: Support bucket metadata config (#351)
Co-authored-by: Anton Babenko <[email protected]>
1 parent 67c046e commit 2a25737

File tree

37 files changed

+129
-47
lines changed

37 files changed

+129
-47
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ Users of Terragrunt can achieve similar results by using modules provided in the
152152
| Name | Version |
153153
|------|---------|
154154
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
155-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.2 |
155+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
156156

157157
## Providers
158158

159159
| Name | Version |
160160
|------|---------|
161-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.2 |
161+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.5 |
162162

163163
## Modules
164164

@@ -177,6 +177,7 @@ No modules.
177177
| [aws_s3_bucket_inventory.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_inventory) | resource |
178178
| [aws_s3_bucket_lifecycle_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
179179
| [aws_s3_bucket_logging.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_logging) | resource |
180+
| [aws_s3_bucket_metadata_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_metadata_configuration) | resource |
180181
| [aws_s3_bucket_metric.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_metric) | resource |
181182
| [aws_s3_bucket_object_lock_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object_lock_configuration) | resource |
182183
| [aws_s3_bucket_ownership_controls.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_ownership_controls) | resource |
@@ -243,6 +244,7 @@ No modules.
243244
| <a name="input_control_object_ownership"></a> [control\_object\_ownership](#input\_control\_object\_ownership) | Whether to manage S3 Bucket Ownership Controls on this bucket. | `bool` | `false` | no |
244245
| <a name="input_cors_rule"></a> [cors\_rule](#input\_cors\_rule) | List of maps containing rules for Cross-Origin Resource Sharing. | `any` | `[]` | no |
245246
| <a name="input_create_bucket"></a> [create\_bucket](#input\_create\_bucket) | Controls if S3 bucket should be created | `bool` | `true` | no |
247+
| <a name="input_create_metadata_configuration"></a> [create\_metadata\_configuration](#input\_create\_metadata\_configuration) | Whether to create metadata configuration resource | `bool` | `false` | no |
246248
| <a name="input_data_redundancy"></a> [data\_redundancy](#input\_data\_redundancy) | Data redundancy. Valid values: `SingleAvailabilityZone` | `string` | `null` | no |
247249
| <a name="input_expected_bucket_owner"></a> [expected\_bucket\_owner](#input\_expected\_bucket\_owner) | The account ID of the expected bucket owner | `string` | `null` | no |
248250
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | (Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. | `bool` | `false` | no |
@@ -258,6 +260,10 @@ No modules.
258260
| <a name="input_lifecycle_rule"></a> [lifecycle\_rule](#input\_lifecycle\_rule) | List of maps containing configuration of object lifecycle management. | `any` | `[]` | no |
259261
| <a name="input_location_type"></a> [location\_type](#input\_location\_type) | Location type. Valid values: `AvailabilityZone` or `LocalZone` | `string` | `null` | no |
260262
| <a name="input_logging"></a> [logging](#input\_logging) | Map containing access bucket logging configuration. | `any` | `{}` | no |
263+
| <a name="input_metadata_encryption_configuration"></a> [metadata\_encryption\_configuration](#input\_metadata\_encryption\_configuration) | Encryption configuration block | `any` | `null` | no |
264+
| <a name="input_metadata_inventory_table_configuration_state"></a> [metadata\_inventory\_table\_configuration\_state](#input\_metadata\_inventory\_table\_configuration\_state) | Configuration state of the inventory table, indicating whether the inventory table is enabled or disabled. Valid values: ENABLED, DISABLED | `string` | `null` | no |
265+
| <a name="input_metadata_journal_table_record_expiration"></a> [metadata\_journal\_table\_record\_expiration](#input\_metadata\_journal\_table\_record\_expiration) | Whether journal table record expiration is enabled or disabled. Valid values: ENABLED, DISABLED | `string` | `null` | no |
266+
| <a name="input_metadata_journal_table_record_expiration_days"></a> [metadata\_journal\_table\_record\_expiration\_days](#input\_metadata\_journal\_table\_record\_expiration\_days) | Number of days to retain journal table records | `number` | `null` | no |
261267
| <a name="input_metric_configuration"></a> [metric\_configuration](#input\_metric\_configuration) | Map containing bucket metric configuration. | `any` | `[]` | no |
262268
| <a name="input_object_lock_configuration"></a> [object\_lock\_configuration](#input\_object\_lock\_configuration) | Map containing S3 object locking configuration. | `any` | `{}` | no |
263269
| <a name="input_object_lock_enabled"></a> [object\_lock\_enabled](#input\_object\_lock\_enabled) | Whether S3 bucket should have an Object Lock configuration enabled. | `bool` | `false` | no |

examples/account-public-access/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.10 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.2 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers

examples/account-public-access/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.2"
7+
version = ">= 6.5"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/complete/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Note that this example may create resources which cost money. Run `terraform des
3030
| Name | Version |
3131
|------|---------|
3232
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
33-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.2 |
33+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
3434
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
3535

3636
## Providers
3737

3838
| Name | Version |
3939
|------|---------|
40-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.2 |
40+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.5 |
4141
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
4242

4343
## Modules

examples/complete/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,17 @@ module "s3_bucket" {
375375
name = "all"
376376
}
377377
]
378+
379+
# metadata configuration example
380+
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html
381+
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-configuring.html
382+
# only available in supported regions: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-restrictions.html
383+
384+
# create_metadata_configuration = true
385+
# metadata_inventory_table_configuration_state = "ENABLED"
386+
# metadata_journal_table_record_expiration = "ENABLED"
387+
# metadata_journal_table_record_expiration_days = 7
388+
# metadata_encryption_configuration = {
389+
# sse_algorithm = "AES256"
390+
# }
378391
}

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.2"
7+
version = ">= 6.5"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/directory-bucket/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.2 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.2 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.5 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
3232

3333
## Modules

examples/directory-bucket/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.2"
7+
version = ">= 6.5"
88
}
99
random = {
1010
source = "hashicorp/random"

examples/notification/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.2 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.5 |
2424
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2525
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.2 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.5 |
3232
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
3333
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
3434

examples/notification/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.2"
7+
version = ">= 6.5"
88
}
99
random = {
1010
source = "hashicorp/random"

0 commit comments

Comments
 (0)