resoto-plugin-cleanup-untagged


Nameresoto-plugin-cleanup-untagged JSON
Version 3.7.0 PyPI version JSON
download
home_page
SummaryResoto Cleanup Untagged Plugin
upload_time2023-09-27 08:17:04
maintainer
docs_urlNone
authorSome Engineering Inc.
requires_python>=3.9
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "resoto-plugin-cleanup-untagged",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "Some Engineering Inc.",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c0/b4/51c7eec8362e49f7dd544f48a32f30a2f2b2ff2227c41b75d5f76f118c7f/resoto-plugin-cleanup-untagged-3.7.0.tar.gz",
    "platform": null,
    "description": "# resoto-plugin-cleanup-untagged\nCleanup Untagged Plugin for Resoto\n\nThis plugin deletes cloud resources that are missing mandatory tags after a certain amount of time has passed since their creation.\n\n## Usage\n\nIn `resh` execute\n\n```\n> config edit resoto.worker\n```\n\nand find the following section\n\n```\nplugin_cleanup_untagged:\n  # Configuration for the plugin\n  config:\n    default:\n      age: '2h'\n    tags:\n      - 'owner'\n      - 'expiration'\n    kinds:\n      - 'aws_ec2_instance'\n      - 'aws_ec2_volume'\n      - 'aws_vpc'\n      - 'aws_cloudformation_stack'\n      - 'aws_elb'\n      - 'aws_alb'\n      - 'aws_alb_target_group'\n      - 'aws_eks_cluster'\n      - 'aws_eks_nodegroup'\n      - 'example_instance'\n      - 'example_network'\n    accounts:\n      aws:\n        068564737731:\n          name: 'playground'\n          age: '7d'\n        '575584959047':\n          name: 'eng-sre'\n      example:\n        Example Account:\n          name: 'Example Account'\n  # Enable plugin?\n  enabled: false\n```\n\n### Config section format\n\nThe 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.\n\nThe `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.\n\nThe `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.\n\nThe following age units are valid:\n\n```\nweeks\ndays\nhours\nminutes\n```\n\nEach 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.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Resoto Cleanup Untagged Plugin",
    "version": "3.7.0",
    "project_urls": {
        "Documentation": "https://resoto.com",
        "Source": "https://github.com/someengineering/resoto/tree/main/plugins/cleanup_untagged"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da7c924d49808ca162e22fa81e6fe94d5b1288eb022f96efd182879f5d700eef",
                "md5": "4f683499fd145b8571cccfba28f676d7",
                "sha256": "6459259955d673112e801a1149decead87e1b829815e157be91857578dcceb1b"
            },
            "downloads": -1,
            "filename": "resoto_plugin_cleanup_untagged-3.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4f683499fd145b8571cccfba28f676d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5009,
            "upload_time": "2023-09-27T08:17:03",
            "upload_time_iso_8601": "2023-09-27T08:17:03.032510Z",
            "url": "https://files.pythonhosted.org/packages/da/7c/924d49808ca162e22fa81e6fe94d5b1288eb022f96efd182879f5d700eef/resoto_plugin_cleanup_untagged-3.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0b451c7eec8362e49f7dd544f48a32f30a2f2b2ff2227c41b75d5f76f118c7f",
                "md5": "90e3a7b3af64c7852c2517b3e0f311e8",
                "sha256": "fa425aa11ff567c0eebf6b129416ba949be921dbbc2f5b8568d5bd12e0a6bb37"
            },
            "downloads": -1,
            "filename": "resoto-plugin-cleanup-untagged-3.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "90e3a7b3af64c7852c2517b3e0f311e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4799,
            "upload_time": "2023-09-27T08:17:04",
            "upload_time_iso_8601": "2023-09-27T08:17:04.726714Z",
            "url": "https://files.pythonhosted.org/packages/c0/b4/51c7eec8362e49f7dd544f48a32f30a2f2b2ff2227c41b75d5f76f118c7f/resoto-plugin-cleanup-untagged-3.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-27 08:17:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "someengineering",
    "github_project": "resoto",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "resoto-plugin-cleanup-untagged"
}
        
Elapsed time: 0.15720s