Skip to content

Commit 3b13274

Browse files
Merge pull request #6 from gaussb-labs/fix/add-launch-config-name-prefix
fix: add name prefix for launch config
2 parents 9fbde6b + 6bff736 commit 3b13274

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

auto_scaling_groups.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
resource "aws_launch_configuration" "ecs_launch_config" {
22
for_each = { for launch_config_name, launch_config in var.launch_configs : launch_config.name => launch_config }
3-
name = "${var.environment}_ecs_${each.value.name}"
3+
name_prefix = "${var.environment}_ecs_${each.value.name}_"
44
image_id = each.value.image_id
55
instance_type = each.value.instance_type
66
user_data_base64 = each.value.user_data_base64
77
iam_instance_profile = each.value.iam_instance_profile_name
88
security_groups = each.value.security_group_ids
9+
lifecycle {
10+
create_before_destroy = true
11+
}
912
}
1013

1114
resource "aws_autoscaling_group" "ecs_cluster_asg" {

0 commit comments

Comments
 (0)