arminc / terraform-ecs

AWS ECS terraform module
MIT License
807 stars 373 forks source link

iam_instance_profile and its dependencies should have lifecycle{ create_before_destroy = true} #16

Open agalazis opened 7 years ago

agalazis commented 7 years ago

https://github.com/arminc/terraform-ecs/blob/8a62442340ff4e58f1cbff61163c6c5d5d103779/modules/ecs_instances/main.tf#L36

aws_launch_configuration has a dependedcy on iam_instance_profile. Since aws_launch_configuration has lifecycle{ create_before_destroy = true}, all its dependencies and their dependencies should have lifecycle{ create_before_destroy = true} this includes iam_instance_profile and its dependencies. I would also like to thank you for the example it helped me a lot to get started, sharing is caring <3 (this also implies the chnage of some names to name prefixes)

arminc commented 7 years ago

You are right, I will try to fix that asap.

Thank you and sorry for a late reaction.