Skip to content

Commit 2d5e78d

Browse files
fix: change s3 inventory optional fields (#321)
* fix: change s3 inventory optional fields * fix: add variable for backwards support * fix: update variable type --------- Co-authored-by: janli <janli@expediagroup.com>
1 parent cce6044 commit 2d5e78d

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [7.10.19] - 2025-06-18
7+
### Changed
8+
- Added new variable `s3_inventory_optional_fields` to support different optional fields
9+
610
## [7.10.18] - 2025-06-10
711
### Changed
812
- Add Lakeformation customer account default database permissions.

VARIABLES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
| s3\_inventory\_customer\_accounts | AWS account IDs allowed to access s3 inventory database. | `list(string)` | `[]` | no |
117117
| s3\_inventory\_expiration\_days | S3 inventory bucket objects expiration days. | `number` | `"7"` | no |
118118
| s3\_inventory\_format | Output format for S3 inventory results. Can be Parquet, ORC, CSV | `string` | `"ORC"` | no |
119+
| s3\_inventory\_optional\_fields | Optional fields for S3 inventory results | `list(string)` | `"["Size", "LastModifiedDate", "StorageClass", "ETag", "IntelligentTieringAccessTier"]"` | no |
119120
| s3\_inventory\_update\_schedule | Cron schedule to update S3 inventory tables (if enabled). Defaults to every 12 hours. | `string` | `"0 */12 * * *"` | no |
120121
| s3\_lifecycle\_abort\_incomplete\_multipart\_upload\_days | Number of days after which incomplete multipart uploads will be deleted. | `string` | `"7"` | no |
121122
| s3\_lifecycle\_policy\_transition\_period | S3 Lifecycle Policy number of days for Transition rule | `string` | `"30"` | no |

s3.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ resource "aws_s3_bucket_inventory" "apiary_bucket" {
140140
}
141141
}
142142

143-
optional_fields = ["Size", "LastModifiedDate", "StorageClass", "ETag", "IntelligentTieringAccessTier"]
143+
optional_fields = var.s3_inventory_optional_fields
144144
}
145145

146146
resource "aws_s3_bucket_public_access_block" "apiary_bucket" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,12 @@ variable "s3_inventory_format" {
693693
default = "ORC"
694694
}
695695

696+
variable "s3_inventory_optional_fields" {
697+
description = "Optional fields for S3 inventory results"
698+
type = list(string)
699+
default = ["Size", "LastModifiedDate", "StorageClass", "ETag", "IntelligentTieringAccessTier"]
700+
}
701+
696702
variable "s3_inventory_customer_accounts" {
697703
description = "AWS account IDs allowed to access s3 inventory database."
698704
type = list(string)

0 commit comments

Comments
 (0)