Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save JohnTheodore/e28c9074471d3ef0bbd9112857910e36 to your computer and use it in GitHub Desktop.

Select an option

Save JohnTheodore/e28c9074471d3ef0bbd9112857910e36 to your computer and use it in GitHub Desktop.
✗ cat dry_run/ebs-mark-unattached-deletion/resources.json
[
{
"AvailabilityZone": "us-east-2a",
"Attachments": [],
"Tags": [
{
"Value": "[email protected]",
"Key": "OwnerEmail"
}
],
"Encrypted": false,
"VolumeType": "gp2",
"VolumeId": "vol-00fa0f1432a26ca96",
"State": "available",
"Iops": 300,
"MatchedFilters": [
"Attachments",
"tag:maid_status"
],
"SnapshotId": "",
"CreateTime": "2017-03-09T22:48:46.487000+00:00",
"Size": 100
},
{
"AvailabilityZone": "us-east-2a",
"Attachments": [],
"Tags": [
{
"Value": "[email protected]",
"Key": "OwnerEmail"
}
],
"Encrypted": false,
"VolumeType": "gp2",
"VolumeId": "vol-0d6ddc4e29c505e4f",
"State": "available",
"Iops": 300,
"MatchedFilters": [
"Attachments",
"tag:maid_status"
],
"SnapshotId": "",
"CreateTime": "2017-03-14T22:02:34.066000+00:00",
"Size": 100
}
]% ➜
➜ cpe-cloudcustodian git:(master) ✗ cat reports/ebs-garbage-collect-unattached-volumes.report.yml
policies:
- name: ebs-mark-unattached-deletion-recent
resource: ebs
comments: |
The following EBS volumes will be deleted in the near future.
filters:
- Attachments: []
➜ cpe-cloudcustodian git:(master) ✗ custodian report -s dry_run --format grid ./reports/ebs-garbage-collect-unattached-volumes.report.yml
+------------+-----------------------------+--------+--------------+------------+
| VolumeId | Attachments[0].InstanceId | Size | VolumeType | KmsKeyId |
+============+=============================+========+==============+============+
+------------+-----------------------------+--------+--------------+------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment