Skip to content

Commit

Permalink
fix: Set timeouts only when values are given (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast authored Jan 15, 2024
1 parent a729331 commit b4bfe39
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,14 @@ resource "aws_lambda_function" "this" {
}
}

timeouts {
create = try(var.timeouts.create, null)
update = try(var.timeouts.update, null)
delete = try(var.timeouts.delete, null)
dynamic "timeouts" {
for_each = length(var.timeouts) > 0 ? [true] : []

content {
create = try(var.timeouts.create, null)
update = try(var.timeouts.update, null)
delete = try(var.timeouts.delete, null)
}
}

tags = merge(var.tags, var.function_tags)
Expand Down

0 comments on commit b4bfe39

Please sign in to comment.