# ASG Volume tags

**URL:** <https://forum.ansible.com/t/asg-volume-tags/29670>\
**Category:** Ansible Project\
**Created:** [February 13, 2019, 3:37pm UTC](https://forum.ansible.com/t/asg-volume-tags/29670 "2019-02-13T15:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Morgan1](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan1](https://forum.ansible.com/u/James_Morgan1)\
**Post date:** [February 13, 2019, 3:37pm UTC](https://forum.ansible.com/t/asg-volume-tags/29670/1 "2019-02-13T15:37:29Z")

</div>

Hi,

Does anybody know how to get tags applied to volumes associated with instances created as part of an ASG?

Instances tags are propagated fine, just no way to tag the volumes that I can see

Many thanks

James

---

<div class="post-metadata">

**Author:** ![Karl\_Auer](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Karl\_Auer](https://forum.ansible.com/u/Karl_Auer)\
**Post date:** [February 15, 2019, 1:20am UTC](https://forum.ansible.com/t/asg-volume-tags/29670/2 "2019-02-15T01:20:41Z")

</div>

Not sure, but you could check out launch templates. There’s no way to do it directly via a launch configuration that I know of.

You CAN do it after the fact by running appropriate userdata scripts, and there is some discussion out there on the Internet about ways to do this.

You can also use the AWS CLI to tag the volumes after they’ve been created. For example, run a cron job that locates untagged volumes, loads up the instance details and then tags the volumes with e.g. one or more of the instance tags. That may or may not be some thing you could do with Ansible.

Regards, K.

---

<div class="post-metadata">

**Author:** ![James\_Morgan1](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan1](https://forum.ansible.com/u/James_Morgan1)\
**Post date:** [February 15, 2019, 9:22am UTC](https://forum.ansible.com/t/asg-volume-tags/29670/3 "2019-02-15T09:22:30Z")

</div>

Hi thanks

Some good suggestions. I did some more digging and found

[https://github.com/eheydrick/ebsautotagger/blob/master/README.md](https://github.com/eheydrick/ebsautotagger/blob/master/README.md)

Using lambda looks like an interesting approach. Gets invoked when there is an autoscale event.

I’ve already got custom user data scripts. That have instance tag info So that could be the easiest approach. Would just need to change the IAM role to allow tagging and looking up volumes

Thanks
