Skip to content

Support for adding new tags to instances based on existing ones#51

Open
m0un10 wants to merge 1 commit intoAnswers4AWS:masterfrom
m0un10:master
Open

Support for adding new tags to instances based on existing ones#51
m0un10 wants to merge 1 commit intoAnswers4AWS:masterfrom
m0un10:master

Conversation

@m0un10
Copy link

@m0un10 m0un10 commented May 3, 2020

This PR adds functionality to graffiti monkey to allow for new tags to be added to instances based on existing ones. For example, if our instances were named dev-01 and dev-02, we could add a rule to add an owner=devmgr@mycompany.com and team=dev tag for any name starting with dev. This is achieved by regular expression rules. For example:

_instance_tags_to_add:
 - key: Name
   matches:
     - match: ^dev.*
       description: Development
       tags_to_set_if_match:
         owner: devmgr@mycompany.com
         team: dev

EXOK-QqVAAADwRh

Existing functionality is not impacted by this addition. The instance tagging is not triggered unless _instance_tags_to_add: is included in the configuration. This tagging can be disabled with --noinstances (as per the same convention used for volumes and snapshots) and it supports dry run with --dryrun

@m0un10 m0un10 changed the title support for adding new tags to instances based on existing ones Support for adding new tags to instances based on existing ones May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant