machine icon indicating copy to clipboard operation
machine copied to clipboard

AWS driver not tagging EBS volumes

Open vmattos opened this issue 6 years ago • 6 comments
trafficstars

The option --amazonec2-tags doesn't seem to tag the EBS volumes, and it seems there is no other option the explicitly tag them, according to this doc https://docs.docker.com/machine/drivers/aws/

Is there any way to tag the volumes during the creation?

vmattos avatar Mar 01 '19 15:03 vmattos

also missing this feature 👍

dhohengassner avatar Mar 11 '19 09:03 dhohengassner

We have an auto-termination policy in our company for everything that is not tagged So being able to tag resources other than the instances themselves is a must 😞

vmattos avatar Mar 11 '19 17:03 vmattos

This seems to be a general problem with the aws driver, the security group that gets created is also not tagged. Maybe change the summary of this issue to something more generic like "AWS driver does not tag all resources it creates (EBS, Security Group...)"

lestephane avatar Oct 02 '19 18:10 lestephane

Same here - I'd like to tag the root volume so that its cost can be monitored in the cost explorer

webmozart avatar Apr 11 '20 21:04 webmozart

I just did some research on whether this is feasible and want to record my findings. Maybe someone has the Go skills to do this (I don't) - it seems easy - or I'll find some time to try my luck at this eventually. :)

In amazonec2.go line 748, we receive the created Instance object after finishing the spot request or running the instance directly.

That Instance should contain a list of InstanceBlockDeviceMappings, which should each contain an EbsInstanceBlockDevice, which store the volumeId of the volume.

If we record these volume IDs and then pass them along as Resources in the call to CreateTags(), this should be solved.

webmozart avatar Oct 07 '20 07:10 webmozart

same here, +1 for this feature 👍

hatim-heffoudhi avatar May 19 '21 09:05 hatim-heffoudhi