Created
April 26, 2018 15:40
-
-
Save jtroberts83/e41c50ccbcbb007628aec92e5b59e3fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: delete-old-snapshots-under-20-gb | |
resource: ebs-snapshot | |
description: | | |
Deletes a snapshot if its older than 7 days and it was created by cloud custodian | |
filters: | |
- type: value | |
key: VolumeSize | |
op: lt | |
value: 20 | |
- type: age | |
days: 7 | |
op: ge | |
- type: value | |
key: Description | |
op: regex | |
value: ^(Automated,Backup,-?)\w+ | |
actions: | |
- delete | |
- name: delete-old-snapshots-under-100-over-20-gb | |
resource: ebs-snapshot | |
description: | | |
Deletes a snapshot if its older than 7 days and it was created by cloud custodian | |
filters: | |
- type: value | |
key: VolumeSize | |
op: ge | |
value: 20 | |
- type: value | |
key: VolumeSize | |
op: lt | |
value: 100 | |
- type: age | |
days: 7 | |
op: ge | |
- type: value | |
key: Description | |
op: regex | |
value: ^(Automated,Backup,-?)\w+ | |
actions: | |
- delete | |
- name: delete-old-snapshots-under-500-over-100-gb | |
resource: ebs-snapshot | |
description: | | |
Deletes a snapshot if its older than 7 days and it was created by cloud custodian | |
filters: | |
- type: value | |
key: VolumeSize | |
op: ge | |
value: 100 | |
- type: value | |
key: VolumeSize | |
op: lt | |
value: 1000 | |
- type: age | |
days: 7 | |
op: ge | |
- type: value | |
key: Description | |
op: regex | |
value: ^(Automated,Backup,-?)\w+ | |
actions: | |
- delete | |
- name: agt-delete-old-snapshots-over-1000-gb | |
resource: ebs-snapshot | |
description: | | |
Deletes a snapshot if its older than 7 days and it was created by cloud custodian | |
filters: | |
- type: value | |
key: VolumeSize | |
op: ge | |
value: 1000 | |
- type: age | |
days: 7 | |
op: ge | |
- type: value | |
key: Description | |
op: regex | |
value: ^(Automated,Backup,-?)\w+ | |
actions: | |
- delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment