Linode Tagger
Tagger is an application that can enforce the presence/absence of API tags in bulk across all taggable Linode APIv4 resource objects:
Object Type |
API Token Scopes Required |
Instances |
linodes:read_write |
Volumes |
volumes:read_write |
NodeBalancers |
nodebalancers:read_write |
Domains |
domains:read_write |
LKEClusters |
lke:read_write |
Usage
LINODE_TOKEN="${your_api_token}" tagger --config /etc/tagger/tagger.yml
Docker Usage
Provide a Linode APIv4 token with appropriate scope to tag your desired objects as an environment variable, along with a bind mount volume for the linode-tagger configuration.
docker run \
-e LINODE_TOKEN="<linode-api-v4-token>" \
-v /path/to/tagger.yml:/etc/tagger/tagger.yml \
ghcr.io/tjhop/linode-tagger
Building
This project uses goreleaser to manage builds.
To manually make a build, you can do:
goreleaser build --rm-dist --single-target --snapshot
Contributions
Commits must follow Conventional Commit format. This repository uses GoReleaser and semver git tags that are determined by the type of commit.
Making a Release
-
Create and merge pull request to linode-tagger
like normal
-
Cut tag for release to trigger goreleaser build via Github Actions
Note: It's highly recommended to install SVU to help with tag creation.
# origin == your fork
# upstream == github.com/tjhop/linode-tagger
git checkout main
git pull --tags upstream main
git tag $(svu next)
git push --tags upstream main