We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9fbde6b + 6bff736 commit 3b13274Copy full SHA for 3b13274
auto_scaling_groups.tf
@@ -1,11 +1,14 @@
1
resource "aws_launch_configuration" "ecs_launch_config" {
2
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}"
+ name_prefix = "${var.environment}_ecs_${each.value.name}_"
4
image_id = each.value.image_id
5
instance_type = each.value.instance_type
6
user_data_base64 = each.value.user_data_base64
7
iam_instance_profile = each.value.iam_instance_profile_name
8
security_groups = each.value.security_group_ids
9
+ lifecycle {
10
+ create_before_destroy = true
11
+ }
12
}
13
14
resource "aws_autoscaling_group" "ecs_cluster_asg" {
0 commit comments