Resoto Cleanup Untagged Plugin
Project description
resoto-plugin-cleanup-untagged
Cleanup Untagged Plugin for Resoto
This plugin deletes cloud resources that are missing mandatory tags after a certain amount of time has passed since their creation.
Usage
In resh execute
> config edit resoto.worker
and find the following section
plugin_cleanup_untagged:
# Configuration for the plugin
config:
default:
age: '2h'
tags:
- 'owner'
- 'expiration'
kinds:
- 'aws_ec2_instance'
- 'aws_ec2_volume'
- 'aws_vpc'
- 'aws_cloudformation_stack'
- 'aws_elb'
- 'aws_alb'
- 'aws_alb_target_group'
- 'aws_eks_cluster'
- 'aws_eks_nodegroup'
- 'example_instance'
- 'example_network'
accounts:
aws:
068564737731:
name: 'playground'
age: '7d'
'575584959047':
name: 'eng-sre'
example:
Example Account:
name: 'Example Account'
# Enable plugin?
enabled: false
Config section format
The config section consists of four sub-sections. default, tags, classes and accounts. The default section specifies the default age a resource must have before we enforce mandatory tags on it. For instance if age is set to 2h this means that whatever mechanism creates a resource has two hours to add those mandatory tags.
The tags section is a list of tag names that MUST exist on every resource class specified in classes. The classes section is a list of resource class names for which tags specified in the tags list must exist.
The accounts section contains a dictionary with cloud IDs as keys (e.g. aws) and account IDs for which tags will be enforced as values (e.g. 068564737731). Those in turn contain a name and optionally an age override.
The following age units are valid:
weeks
days
hours
minutes
Each of them can be abbreviated down to one letter. E.g. 7d, 24h, 60m, etc. A space in between the numeric and the unit is optional, meaning 7d and 7 days are equivalent.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resoto-plugin-cleanup-untagged-3.3.2.tar.gz.
File metadata
- Download URL: resoto-plugin-cleanup-untagged-3.3.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3d1d0e21a8b009fb90473b6fcfd30ec34a853b8e626feedb631bab5642a36bc
|
|
| MD5 |
21866eb681291415a72e8120920c7739
|
|
| BLAKE2b-256 |
045a09774a8a64c52bd2cf88bdb408de4ba561b79265dddab7b82fe167f1b1d3
|
File details
Details for the file resoto_plugin_cleanup_untagged-3.3.2-py3-none-any.whl.
File metadata
- Download URL: resoto_plugin_cleanup_untagged-3.3.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ec95e4469e9e3a96f93a8ed5e717927d447e5415c9706808f661f13f3363f9
|
|
| MD5 |
abebd25bc5a101d51fc630c211dbdaf1
|
|
| BLAKE2b-256 |
7ebce9ef35b43633b3a69b7c29c11b0662ae86f08e90f9a52db8621153c7cd05
|