Skip to content

Commit

Permalink
additional arguments which are useful memory_size and retry_duration …
Browse files Browse the repository at this point in the history
…added (#45)
  • Loading branch information
ranga543 authored Sep 23, 2024
1 parent d44599d commit 1e929bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "aws_kinesis_firehose_delivery_stream" "kinesis_firehose" {
hec_acknowledgment_timeout = var.hec_acknowledgment_timeout
hec_endpoint_type = var.hec_endpoint_type
s3_backup_mode = var.s3_backup_mode
retry_duration = var.kinesis_firehose_retry_duration

s3_configuration {
role_arn = aws_iam_role.kinesis_firehose.arn
Expand Down Expand Up @@ -307,6 +308,7 @@ resource "aws_lambda_function" "firehose_lambda_transform" {
handler = local.lambda_function_handler
source_code_hash = data.archive_file.lambda_function.output_base64sha256
runtime = var.nodejs_runtime
memory_size = var.lambda_function_memory_size
timeout = var.lambda_function_timeout
reserved_concurrent_executions = var.lambda_reserved_concurrent_executions
kms_key_arn = var.lambda_function_environment_variables != {} ? var.lambda_kms_key_arn : null
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ variable "firehose_name" {
type = string
}

variable "kinesis_firehose_retry_duration" {
description = "After an initial failure to deliver to Splunk, the total amount of time, in seconds between 0 to 7200, during which Firehose re-attempts delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. The default value is 300s. There will be no retry if the value is 0"
type = number
default = 300 # Seconds
}

variable "kinesis_firehose_buffer" {
description = "https://www.terraform.io/docs/providers/aws/r/kinesis_firehose_delivery_stream.html#buffer_size"
type = number
Expand Down Expand Up @@ -146,6 +152,12 @@ variable "lambda_function_name" {
default = "kinesis-firehose-transform"
}

variable "lambda_function_memory_size" {
description = "Amount of memory in MB which Lambda Function can use at runtime. Defaults to 128"
type = number
default = 128
}

variable "lambda_function_timeout" {
description = "The function execution time at which Lambda should terminate the function."
type = number
Expand Down

0 comments on commit 1e929bc

Please sign in to comment.