Skip to content

Commit

Permalink
feat: Support arm64 lambda functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmtaylor committed Jun 7, 2022
1 parent 68a2014 commit ce5a9c9
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module "webhook" {
webhook_lambda_s3_key = var.webhook_lambda_s3_key
webhook_lambda_s3_object_version = var.webhook_lambda_s3_object_version
lambda_runtime = var.lambda_runtime
lambda_architecture = var.lambda_architecture
lambda_zip = var.webhook_lambda_zip
lambda_timeout = var.webhook_lambda_timeout
logging_retention_in_days = var.logging_retention_in_days
Expand Down Expand Up @@ -169,6 +170,7 @@ module "runners" {
runners_lambda_s3_key = var.runners_lambda_s3_key
runners_lambda_s3_object_version = var.runners_lambda_s3_object_version
lambda_runtime = var.lambda_runtime
lambda_architecture = var.lambda_architecture
lambda_zip = var.runners_lambda_zip
lambda_timeout_scale_up = var.runners_scale_up_lambda_timeout
lambda_timeout_scale_down = var.runners_scale_down_lambda_timeout
Expand Down Expand Up @@ -229,6 +231,7 @@ module "runner_binaries" {
syncer_lambda_s3_key = var.syncer_lambda_s3_key
syncer_lambda_s3_object_version = var.syncer_lambda_s3_object_version
lambda_runtime = var.lambda_runtime
lambda_architecture = var.lambda_architecture
lambda_zip = var.runner_binaries_syncer_lambda_zip
lambda_timeout = var.runner_binaries_syncer_lambda_timeout
logging_retention_in_days = var.logging_retention_in_days
Expand Down
1 change: 1 addition & 0 deletions modules/runner-binaries-syncer/runner-binaries-syncer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resource "aws_lambda_function" "syncer" {
runtime = var.lambda_runtime
timeout = var.lambda_timeout
memory_size = 256
architectures = [var.lambda_architecture]

environment {
variables = {
Expand Down
6 changes: 6 additions & 0 deletions modules/runner-binaries-syncer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,9 @@ variable "lambda_runtime" {
type = string
default = "nodejs14.x"
}

variable "lambda_architecture" {
description = "AWS Lambda architecture."
type = string
default = "arm64"
}
1 change: 1 addition & 0 deletions modules/runners/scale-down.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ resource "aws_lambda_function" "scale_down" {
timeout = var.lambda_timeout_scale_down
tags = local.tags
memory_size = 512
architectures = [var.lambda_architecture]

environment {
variables = {
Expand Down
1 change: 1 addition & 0 deletions modules/runners/scale-up.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource "aws_lambda_function" "scale_up" {
reserved_concurrent_executions = var.scale_up_reserved_concurrent_executions
memory_size = 512
tags = local.tags
architectures = [var.lambda_architecture]

environment {
variables = {
Expand Down
6 changes: 6 additions & 0 deletions modules/runners/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,9 @@ variable "lambda_runtime" {
type = string
default = "nodejs14.x"
}

variable "lambda_architecture" {
description = "AWS Lambda architecture."
type = string
default = "arm64"
}
6 changes: 6 additions & 0 deletions modules/webhook/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@ variable "lambda_runtime" {
type = string
default = "nodejs14.x"
}

variable "lambda_architecture" {
description = "AWS Lambda architecture."
type = string
default = "arm64"
}
1 change: 1 addition & 0 deletions modules/webhook/webhook.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resource "aws_lambda_function" "webhook" {
handler = "index.githubWebhook"
runtime = var.lambda_runtime
timeout = var.lambda_timeout
architectures = [var.lambda_architecture]

environment {
variables = {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -641,3 +641,9 @@ variable "lambda_runtime" {
type = string
default = "nodejs14.x"
}

variable "lambda_architecture" {
description = "AWS Lambda architecture."
type = string
default = "arm64"
}

0 comments on commit ce5a9c9

Please sign in to comment.