Skip to content

Commit 155aefa

Browse files
author
David Trebicky
committed
chore: add autoscaling target lifecycle policy
1 parent 6fe39a5 commit 155aefa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

autoscaling.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ resource "aws_appautoscaling_target" "ecs_target" {
66
scalable_dimension = "ecs:service:DesiredCount"
77
service_namespace = "ecs"
88
depends_on = [aws_ecs_service.application]
9+
10+
lifecycle {
11+
replace_triggered_by = [
12+
# Replace `aws_appautoscaling_target` each time this instance of
13+
# the `aws_ecs_service` is replaced.
14+
aws_ecs_service.application.id
15+
]
16+
}
917
}
1018

1119
// metric used for auto scale

0 commit comments

Comments
 (0)