Skip to content

Commit df29596

Browse files
committed
Trigger instance refresh in the ASG when the launch template configuration changes
1 parent b8495ce commit df29596

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/instance/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ resource "aws_autoscaling_group" "asg" {
8080
version = aws_launch_template.launch_template.latest_version
8181
}
8282

83+
instance_refresh {
84+
strategy = "Rolling"
85+
preferences {
86+
# Whenever the launch template changes, allow replacing instances all at once
87+
min_healthy_percentage = 0
88+
}
89+
}
90+
8391
# aws_autoscaling_group doesn't have a "tags" attribute, but instead a "tag" block
8492
dynamic "tag" {
8593
for_each = merge({ "Name" = "DatadogAgentlessScannerASG" }, var.tags, local.dd_tags)

0 commit comments

Comments
 (0)