Skip to content

Commit

Permalink
feat: add support for all taggable Linode objects (#4)
Browse files Browse the repository at this point in the history
* feat: add support for all taggable Linode objects

This adds the ability to additionally tag volumes, nodebalanacers,
domains and lkeclusters. Report/JSON output has been updated to support
this new output too.

* chore: update readme and example tagger config

The readme changes highlight support for all the taggable Linode APIv4
objects, in conjunction with the new sample tagger config.

The tagger config not only shows all the different resource types you
can tag but highlights some common use cases and syntax (multiple tags,
empty list).

* ref: change yaml config to refer to lke_clusters

* ref: make most naming of linode/instance generic

In many variable names, function names and comments linode/instance was
used when really the data referred to a generic Linode API object of any
sort. This was changed to reflect the unknown nature of the linode
object.

* ref: declare linodeObjects once and reinsert values

* ref: improve error string for tag update failed

* ref: add type field to logTags

Also cleanup a few Linode references

* ref: simpler fetching of linodeObjects
  • Loading branch information
wbollock authored and tjhop committed Jul 25, 2022
1 parent a9b0be2 commit a9f2910
Show file tree
Hide file tree
Showing 3 changed files with 462 additions and 132 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Linode Tagger

Tagger is an application that can enforce the presence/absence of API tags in bulk across all of your Linode instances.
_Note_: currently, `tagger` only supports Linode instances.
This application may be updated in the future to support enforcing tag sets on other Linode APIv4 resource objects.
Tagger is an application that can enforce the presence/absence of API tags in bulk across all taggable Linode APIv4 resource objects:

* Instances
* Volumes
* NodeBalancers
* Domains
* LKEClusters

## Usage

Expand Down
30 changes: 30 additions & 0 deletions packaging/etc/tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,33 @@ tagger:
- tagger_managed_1
absent:
- tagger_absent_1
volumes:
- regex: '.+'
tags:
present:
- tagger_managed_1
absent:
- tagger_absent_1
nodebalancers:
- regex: 'ccm.+'
tags:
present:
- tagger_managed_1
- lke
absent:
- tagger_absent_1
domains:
- regex: '.+'
tags:
present:
- tagger_managed_1
absent: []
lke_clusters:
- regex: '.+'
tags:
present:
- tagger_managed_1
- lke
absent:
- tagger_absent_1
- tagger_absent_2
Loading

0 comments on commit a9f2910

Please sign in to comment.