Skip to content

Commit

Permalink
Don't specify architecture if default is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKotowick committed Jun 17, 2022
1 parent 8440c9a commit 1f31516
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ module "shell_lambda" {
memory_size = var.lambda_memory_size
role = local.lambda_role
layers = var.lambda_layer_arns
architectures = [var.lambda_architecture]
// There seems to be a bug where, if you specify the x86_64 (default) architecture in a region that doesn't
// support the arm64 architecture, it won't keep the architecture in the state file. This results in a
// perpetual difference. So, if it's the default, we just set it to null and let it be default.
architectures = var.lambda_architecture != "x86_64" ? [var.lambda_architecture] : null
tags = {
"ModuleAuthor" = "InvictonLabs"
"ModuleUrl" = "https://registry.terraform.io/modules/Invicton-Labs/lambda-shell/aws"
Expand Down

0 comments on commit 1f31516

Please sign in to comment.