Skip to content

Commit 03380a8

Browse files
authored
Update main.tf
1 parent c80c92b commit 03380a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource "aws_lambda_function" "this" {
2525

2626
lifecycle {
2727
precondition {
28-
condition = var.create_role && var.lambda_role != []
28+
condition = !var.create_role || var.create_role && var.lambda_role == ""
2929
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."
3030
# The lambda_role variable should only be used to attach a pre-existing role, and will do nothing
3131
# if create_role is true.

0 commit comments

Comments
 (0)