Skip to content

Commit

Permalink
feat: Add custom_time_zone and file_extension attributes in s3 config…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
fdmsantos committed Aug 26, 2024
1 parent c494be7 commit e709b60
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,9 @@ No modules.
| <a name="input_s3_configuration_buffering_interval"></a> [s3\_configuration\_buffering\_interval](#input\_s3\_configuration\_buffering\_interval) | Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. | `number` | `300` | no |
| <a name="input_s3_configuration_buffering_size"></a> [s3\_configuration\_buffering\_size](#input\_s3\_configuration\_buffering\_size) | Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5. We recommend setting SizeInMBs to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec set SizeInMBs to be 10 MB or higher. | `number` | `5` | no |
| <a name="input_s3_cross_account"></a> [s3\_cross\_account](#input\_s3\_cross\_account) | Indicates if S3 bucket destination is in a different account | `bool` | `false` | no |
| <a name="input_s3_custom_time_zone"></a> [s3\_custom\_time\_zone](#input\_s3\_custom\_time\_zone) | The time zone you prefer. Valid values are UTC or a non-3-letter IANA time zones (for example, America/Los\_Angeles). Default value is UTC. | `string` | `"UTC"` | no |
| <a name="input_s3_error_output_prefix"></a> [s3\_error\_output\_prefix](#input\_s3\_error\_output\_prefix) | Prefix added to failed records before writing them to S3. This prefix appears immediately following the bucket name. | `string` | `null` | no |
| <a name="input_s3_file_extension"></a> [s3\_file\_extension](#input\_s3\_file\_extension) | The file extension to override the default file extension (for example, .json). | `string` | `null` | no |
| <a name="input_s3_kms_key_arn"></a> [s3\_kms\_key\_arn](#input\_s3\_kms\_key\_arn) | Specifies the KMS key ARN the stream will use to encrypt data. If not set, no encryption will be used | `string` | `null` | no |
| <a name="input_s3_own_bucket"></a> [s3\_own\_bucket](#input\_s3\_own\_bucket) | Indicates if you own the bucket. If not, will be configure permissions to grants the bucket owner full access to the objects delivered by Kinesis Data Firehose | `bool` | `true` | no |
| <a name="input_s3_prefix"></a> [s3\_prefix](#input\_s3\_prefix) | The YYYY/MM/DD/HH time format prefix is automatically used for delivered S3 files. You can specify an extra prefix to be added in front of the time format prefix. Note that if the prefix ends with a slash, it appears as a folder in the S3 bucket | `string` | `null` | no |
Expand Down
2 changes: 2 additions & 0 deletions examples/s3/kinesis-to-s3-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ module "firehose" {
dynamic_partition_metadata_extractor_query = "{user_id:.user_id}"
append_delimiter_to_record = true
dynamic_partition_enable_record_deaggregation = true
s3_custom_time_zone = "America/Los_Angeles"
s3_file_extension = ".json"
}
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ resource "aws_kinesis_firehose_delivery_stream" "this" {
s3_backup_mode = local.s3_backup
kms_key_arn = var.enable_s3_encryption ? var.s3_kms_key_arn : null
compression_format = var.s3_compression_format
custom_time_zone = var.s3_custom_time_zone
file_extension = var.s3_file_extension

dynamic "dynamic_partitioning_configuration" {
for_each = var.enable_dynamic_partitioning ? [1] : []
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,18 @@ variable "s3_compression_format" {
}
}

variable "s3_custom_time_zone" {
description = "The time zone you prefer. Valid values are UTC or a non-3-letter IANA time zones (for example, America/Los_Angeles). Default value is UTC."
type = string
default = "UTC"
}

variable "s3_file_extension" {
description = "The file extension to override the default file extension (for example, .json)."
type = string
default = null
}

variable "s3_own_bucket" {
description = "Indicates if you own the bucket. If not, will be configure permissions to grants the bucket owner full access to the objects delivered by Kinesis Data Firehose"
type = bool
Expand Down

0 comments on commit e709b60

Please sign in to comment.