|
iam_instance_profile = "${var.iam_instance_profile_id}" |
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)