Skip to content

Commit

Permalink
Merge pull request #20658 from orf/main
Browse files Browse the repository at this point in the history
Add support for BucketKeyStatus to S3 inventories
  • Loading branch information
ewbankkit authored Aug 24, 2021
2 parents 44c24bb + 7a75cb8 commit a4d198d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .changelog/20658.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_s3_bucket_inventory: Add missing values to `optional_fields` argument
```
16 changes: 2 additions & 14 deletions aws/resource_aws_s3_bucket_inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,8 @@ func resourceAwsS3BucketInventory() *schema.Resource {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{
s3.InventoryOptionalFieldSize,
s3.InventoryOptionalFieldLastModifiedDate,
s3.InventoryOptionalFieldStorageClass,
s3.InventoryOptionalFieldEtag,
s3.InventoryOptionalFieldIsMultipartUploaded,
s3.InventoryOptionalFieldReplicationStatus,
s3.InventoryOptionalFieldEncryptionStatus,
s3.InventoryOptionalFieldObjectLockMode,
s3.InventoryOptionalFieldObjectLockRetainUntilDate,
s3.InventoryOptionalFieldObjectLockLegalHoldStatus,
s3.InventoryOptionalFieldIntelligentTieringAccessTier,
}, false),
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice(s3.InventoryOptionalField_Values(), false),
},
Set: schema.HashString,
},
Expand Down
3 changes: 1 addition & 2 deletions website/docs/r/s3_bucket_inventory.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ The following arguments are supported:
* `destination` - (Required) Contains information about where to publish the inventory results (documented below).
* `enabled` - (Optional, Default: `true`) Specifies whether the inventory is enabled or disabled.
* `filter` - (Optional) Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria (documented below).
* `optional_fields` - (Optional) List of optional fields that are included in the inventory results.
Valid values: `Size`, `LastModifiedDate`, `StorageClass`, `ETag`, `IsMultipartUploaded`, `ReplicationStatus`, `EncryptionStatus`, `ObjectLockRetainUntilDate`, `ObjectLockMode`, `ObjectLockLegalHoldStatus`, `IntelligentTieringAccessTier`.
* `optional_fields` - (Optional) List of optional fields that are included in the inventory results. Please refer to the S3 [documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_InventoryConfiguration.html#AmazonS3-Type-InventoryConfiguration-OptionalFields) for more details.

The `filter` configuration supports the following:

Expand Down

0 comments on commit a4d198d

Please sign in to comment.