Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform/modules/function/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ resource "aws_lambda_function" "this" {
timeout = var.timeout
memory_size = var.memory_size
layers = var.layer_arns
architectures = ["arm64"]
architectures = [var.architecture]

tracing_config {
mode = "Active"
Expand Down
10 changes: 10 additions & 0 deletions terraform/modules/function/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ variable "handler" {
default = "function_handler"
}

variable "architecture" {
description = ""
type = string
default = "x86_64"
validation {
condition = contains(["x86_64", "arm64"], var.architecture)
error_message = "Valid value for architecture is x86_64 or arm64"
}
}

variable "runtime" {
description = "Lambda function runtime"
type = string
Expand Down