Answers4AWS / graffiti-monkey

Goes around tagging things
Apache License 2.0
255 stars 88 forks source link

Make tags configurable #4

Closed thirstycat closed 9 years ago

thirstycat commented 10 years ago

Would love to be able to easily configure which tags are propagated.

pas256 commented 10 years ago

That seems reasonable. How did you envision this working?

thirstycat commented 10 years ago

Well, as a quick hack, I just modified core.py to include:

This list of tags associated with an EC2 instance to propagate to

    # attached EBS volumes
    self._instance_tags_to_propagate = ['Name','Product','Client']
    # This is a list of tags associated with a volume to propagate to
    # a snapshot created from the volume 
    self._volume_tags_to_propagate = ['Name','instance_id','device','Product','Client']

(added 'Product' and 'Client' tags that I'm using).

was looking at the graffiti_monkey.yml file you already have and it seems that already has some initial framework for specifying which tags should get propagated from instance->volume->snapshot

I could envision wanting to override the Name tag as well as it might make sense to already have specific volumes have names other than the instance Name.

pas256 commented 10 years ago

That sounds great.

If you have the time to flush it out a little more, I would gladly accept a pull request for this.

paulwakeford commented 10 years ago

Yes, configurable tags would be great. Also the option to override (or not) an existing tag of the same name. I'm not a Python god but would be happy to take a look if thirstycat can't.

pas256 commented 9 years ago

This is now available:

https://pypi.python.org/pypi/graffiti_monkey/0.8.0

Thanks to @pvbouwel on Issue #7.