Skip to content

Commit

Permalink
fix: add depends_on for aws_autoscaling_policy
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Kohout <[email protected]>
  • Loading branch information
Tomas Kohout committed Oct 10, 2024
1 parent 7babca2 commit f81b108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ resource "aws_autoscaling_schedule" "this" {
################################################################################

resource "aws_autoscaling_policy" "this" {
for_each = { for k, v in var.scaling_policies : k => v if local.create && var.create_scaling_policy }
for_each = { for k, v in var.scaling_policies : k => v if local.create && var.create_scaling_policy }
depends_on = [aws_autoscaling_traffic_source_attachment.this]

name = try(each.value.name, each.key)
autoscaling_group_name = var.ignore_desired_capacity_changes ? aws_autoscaling_group.idc[0].name : aws_autoscaling_group.this[0].name
Expand Down

0 comments on commit f81b108

Please sign in to comment.