diff --git a/main.tf b/main.tf index 5dbedf3..a574029 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,3 @@ -terraform { - required_version = ">= 0.12" -} - resource "aws_lambda_function" "lambda_function" { image_uri = var.image_uri s3_bucket = var.s3_bucket @@ -16,6 +12,7 @@ resource "aws_lambda_function" "lambda_function" { tags = var.tags package_type = var.image_uri != null ? "Image" : "Zip" layers = var.layers + architectures = var.architectures dynamic "image_config" { for_each = var.image_uri != null ? [1] : [] diff --git a/variables.tf b/variables.tf index bfc4210..50bdb80 100644 --- a/variables.tf +++ b/variables.tf @@ -137,3 +137,8 @@ variable "lambda_cron_schedule" { description = "value of cron expression for scheduled lambda" default = "" } +variable "architectures" { + type = list(string) + description = "The architectures supported by the Lambda function." + default = ["x86_64"] +} \ No newline at end of file diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..a0fa771 --- /dev/null +++ b/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 0.12" + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3.61.0" + } + } +} \ No newline at end of file