Skip to content

Commit

Permalink
fix: adding memory size variable to complete module (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian-Soares authored Jul 17, 2024
1 parent 783b51e commit d87c994
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions infrastructure/ebs-checker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module "complete" {
lambda_function_handler = "lambda_function.lambda_handler"
lambda_function_runtime = "python3.8"
lambda_function_timeout = 120
lambda_function_memory_size = 1028
lambda_function_source_code_path = "../../lambdas/ebs-checker"
lambda_function_custom_policy_arns = [
"arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/ebs-modify-policy",
Expand Down
14 changes: 8 additions & 6 deletions infrastructure/modules/complete/main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module "lambda_function" {
source = "../lambda-function"

create = try(var.create_lambda_function, true)
name = var.lambda_function_name
description = try(var.lambda_function_description, "")
handler = try(var.lambda_function_handler, "lambda_function.lambda_handler")
runtime = try(var.lambda_function_runtime, "python3.8")
timeout = try(var.lambda_function_timeout, 120)
create = try(var.create_lambda_function, true)
name = var.lambda_function_name
description = try(var.lambda_function_description, "")
handler = try(var.lambda_function_handler, "lambda_function.lambda_handler")
runtime = try(var.lambda_function_runtime, "python3.8")
timeout = try(var.lambda_function_timeout, 120)
memory_size = try(var.lambda_function_memory_size)

source_code_path = var.lambda_function_source_code_path
vpc_config = try(var.lambda_vpc_config, null) != null ? {
subnet_ids = var.lambda_vpc_config.subnet_ids
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/modules/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ variable "lambda_function_timeout" {
type = number
}

variable "lambda_function_memory_size" {
description = "The memory size of the Lambda function"
type = number
default = 128
}

variable "lambda_function_source_code_path" {
description = "The path to the source code of the Lambda function"
type = string
Expand Down

0 comments on commit d87c994

Please sign in to comment.