Skip to content

Commit 1f31516

Browse files
committed
Don't specify architecture if default is selected
1 parent 8440c9a commit 1f31516

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ module "shell_lambda" {
2828
memory_size = var.lambda_memory_size
2929
role = local.lambda_role
3030
layers = var.lambda_layer_arns
31-
architectures = [var.lambda_architecture]
31+
// There seems to be a bug where, if you specify the x86_64 (default) architecture in a region that doesn't
32+
// support the arm64 architecture, it won't keep the architecture in the state file. This results in a
33+
// perpetual difference. So, if it's the default, we just set it to null and let it be default.
34+
architectures = var.lambda_architecture != "x86_64" ? [var.lambda_architecture] : null
3235
tags = {
3336
"ModuleAuthor" = "InvictonLabs"
3437
"ModuleUrl" = "https://registry.terraform.io/modules/Invicton-Labs/lambda-shell/aws"

0 commit comments

Comments
 (0)