Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

instance volume tagging #90

Open
jcejohnson opened this issue Aug 24, 2018 · 5 comments
Open

instance volume tagging #90

jcejohnson opened this issue Aug 24, 2018 · 5 comments

Comments

@jcejohnson
Copy link
Contributor

jcejohnson commented Aug 24, 2018

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.

@jcejohnson
Copy link
Contributor Author

jcejohnson commented Aug 24, 2018

@brikis98
Copy link
Collaborator

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.

@jcejohnson jcejohnson changed the title ELB tagging instance volume tagging Aug 24, 2018
@jcejohnson
Copy link
Contributor Author

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).

@jcejohnson
Copy link
Contributor Author

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.

@agaudreault
Copy link

Any news on this ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants