Open jcejohnson opened 6 years ago
OK, well, I didn't get very far before I hit https://github.com/terraform-providers/terraform-provider-aws/issues/4553 The WIP: https://github.com/EFXCIA/terraform-aws-vault/commits/feature/launch-template
By ELB Volumes, do you mean EBS Volumes? If so, which ones?
Also, I don't remember the details, but I looked into launch templates a while back and hit lots of limitations (e.g., something to do with not being able to specify subnets?), so I'm not excited about the prospect of changing to them.
Yes, sorry, I have ELB on the brain from other stuff I've been doing today. I worked with the launch templates most of the morning before I hit that bug. I'll probably try a manual workaround so that I can at least continue testing. I was hoping to be able to implement an either/or so that users of the module could choose launch config vs. launch template but HCL doesn't seem to give me a way to do that (even with the count() trick).
I have a working version with no hacks at the WIP URL above. The implementation lets you choose between launch_configuration and launch_template by setting asg_launch_mechanism which defaults to launch_configuration for backward compatibility The major advantages to launch_tempalate is the ability to set volume encryption and tags.
I think I'm still having issues due to the AWS provider bug. I can only successfully apply when setting encrypted="" on the EBS volume.
Any news on this ?
I'm back again with more tagging drama... This time it is the volumes attached to the instances created by the autoscaling group. aws_launch_configuration does not give us a way to set those but aws_launch_template does. I'm working on a solution that replaces the former with the latter. I can't find a way in HCL to allow for either-or. I'll submit a PR once I have something that works (and one for terraform-aws-consul also) but wanted to open the discussion early in case anyone else has ideas on the subject.