Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
nsimmonds authored Jul 31, 2024
1 parent c80c92b commit 03380a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 03380a8

Please sign in to comment.