Skip to content

Commit

Permalink
add architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
marciogoda committed May 22, 2024
1 parent 43f594e commit 48b846f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 1 addition & 4 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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] : []
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
9 changes: 9 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 0.12"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.61.0"
}
}
}

0 comments on commit 48b846f

Please sign in to comment.