Skip to content

Commit

Permalink
Fix bug with provisioned concurrency required to be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rotciw committed Apr 3, 2024
1 parent 62cc502 commit 2639ca9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,9 @@ resource "aws_appautoscaling_policy" "this" {
}

resource "aws_appautoscaling_scheduled_action" "this" {
for_each = {
for_each = var.provisioned_concurrency != null ? {
for v in var.provisioned_concurrency.schedules : v.schedule => v
if var.provisioned_concurrency != null
}
} : {}

name = "${var.name}-lambda-scheduled-scaling"
resource_id = aws_appautoscaling_target.this[0].resource_id
Expand Down

0 comments on commit 2639ca9

Please sign in to comment.