Skip to content

schrill/terraform-aws-clean-old-ami

 
 

Repository files navigation

This Lamdba function deletes all golden images older than number of days specified in the variable, default is 60.

Schema

schema

How it works

  • Select all the images with the TAG_Filter variable
  • For each image check if it is older than the days in the DELETE_OLDER_THAN_DAYS variable
  • If the image doesn't have the tag in the EXCLUSION_TAG variable or the value isn't True it will be deregister

schema

You can change this lambda environment variables passing different values at terraform module level.

Usage Example

module "clean_old_ami" {
  source  = "giuseppeborgese/clean-old-ami/aws"
  prefix  = "MyAccountName"
}

When it runs

Every first day of each month. whenitruns

Compatible with TF-0.13

About

Terraform module to delete old AWS AMI/Images

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 74.1%
  • Python 25.9%