From 03380a88475b5e6fa18e996879737a111975417e Mon Sep 17 00:00:00 2001 From: Nick Simmonds Date: Wed, 31 Jul 2024 17:31:24 -0400 Subject: [PATCH] Update main.tf --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 4e62807e..360e0592 100644 --- a/main.tf +++ b/main.tf @@ -25,7 +25,7 @@ resource "aws_lambda_function" "this" { lifecycle { precondition { - condition = var.create_role && var.lambda_role != [] + condition = !var.create_role || var.create_role && var.lambda_role == "" error_message = "The 'create_role' and 'lambda_role' variables should not be used together. When creating a role, use 'role_name' to set the name." # The lambda_role variable should only be used to attach a pre-existing role, and will do nothing # if create_role is true.