The script schedules the review of any ebs volumes that have been unattached for X days (deafult 7).
This reviews all regions in your account
module "aws_tf_ebs_volumes_cleaner" { source = "/aws_tf_ebs_volumes_cleaner" }
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| ebs_volumes_cleanup_cron | Rate expression for when to run the review of volumes | string | "cron(0 7 ? * MON-FRI *)" |
no |
| function_prefix | Prefix for the name of the lambda created | string | "" |
no |
| days | how many days a volumes needs to be unattached to delete | string | "7" |
no |
| dryrun | If this is a dry run or a real test. By default it will not be a dry run so will action | string | "False" |
no |
| bucket_name | Add name of bucket if you wish to upload json file to s3 bucket | string | "" |
no |
If you do not want it to be deleted then Tag Protection = True
It will run and tag volumes that need to be reviewed and will delete in a week
Configure your AWS credentials using one of the supported methods for AWS CLI
tools, such as setting the
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. If you're using the ~/.aws/config file for profiles then export AWS_SDK_LOAD_CONFIG as "True".