Coder Social home page Coder Social logo

giuliocalzolari / terraform-aws-es-cleanup Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 14.0 158 KB

AWS Elasticsearch Lambda Curator

Home Page: https://registry.terraform.io/modules/giuliocalzolari/es-cleanup/

License: Other

HCL 100.00%
aws elasticsearch curator lambda python

terraform-aws-es-cleanup's Introduction

AWS Lambda Elasticsearch Index Cleanup

Overview

This AWS Lambda function allows you to delete the old Elasticsearch indexes using SigV4Auth authentication. You configure the AWS Elasticsearch Access Policy authorizing the Lambda Role or the AWS Account number instead of using the IP address whitelist.

Diagram

Terraform version

Module compatible with Terraform 0.12

Module Input Variables

Providers

Name Version
archive n/a
aws n/a
http n/a
local n/a
null n/a

Inputs

Name Description Type Default Required
delete_after Numbers of days to preserve number 15 no
es_endpoint AWS ES FQDN e.g. search-es-demo-xxxxxxxxxx.eu-west-1.es.amazonaws.com string n/a yes
index Index/indices to process using regex, except the one matching skip_index regex string ".*" no
index_format Combined with 'index' varible is used to evaluate the index age string "%Y.%m.%d" no
prefix A prefix for the resource names, this helps create multiple instances of this stack for different environments string "" no
python_version Lambda Python version to be used string "3.6" no
schedule Cloudwatch Cron Schedule expression for running the cleanup function string "cron(0 3 * * ? *)" no
security_group_ids Addiational Security Ids To add. list(string) [] no
skip_index Index/indices to skip string ".kibana*" no
subnet_ids Subnet IDs you want to deploy the lambda in. Only fill this in if you want to deploy your Lambda function inside a VPC. list(string) [] no
suffix A suffix for the resource names, this helps create multiple instances of this stack for different environments string "" no
tags Tags to apply map
{
"Name": "es-cleanup"
}
no
timeout Maximum lambda execution time number 300 no

Outputs

No output.

Example

terraform {
  required_version = ">= 0.12"
}

provider "aws" {
  region = "eu-west-1"
}


module "public_es_cleanup" {
  source       = "giuliocalzolari/es-cleanup/aws"
  version      = "1.14.0"
  prefix       = "public_es_"
  es_endpoint  = "test-es-XXXXXXX.eu-central-1.es.amazonaws.com"
  delete_after = 365
}


module "vpc_es_cleanup" {
  source             = "giuliocalzolari/es-cleanup/aws"
  version            = "1.14.0"
  prefix             = "vpc_es_"
  es_endpoint        = "vpc-gc-demo-vpc-gloo5rzcdhyiykwdlots2hdjla.eu-central-1.es.amazonaws.com"
  index              = "all"
  delete_after       = 30
  subnet_ids         = ["subnet-d8660da2"]
  security_group_ids = ["sg-02dd3aa6da1b5"]
}

Authors

Module is maintained by Giulio Calzolari with help from these awesome contributors.

License

terraform-aws-es-cleanup is licensed under the Apache Software License 2.0. Originally developed by Cloudreach adapted in this repo due to Terraform Registry Requirements

terraform-aws-es-cleanup's People

Contributors

bilardi avatar cheungpat avatar cliveza avatar dcodix avatar giuliocalzolari avatar mattiasgees avatar netflash avatar umbrant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

terraform-aws-es-cleanup's Issues

Invalid type specification

Using terraform v0.12.6

Error: Invalid type specification

  on .terraform/modules/es_logging_cleanup/giuliocalzolari-terraform-aws-es-cleanup-b36108f/variables.tf line 56, in variable "subnet_ids":
  56:   type        = list()

The list type constructor requires one argument specifying the element type.


Error: Invalid type specification

  on .terraform/modules/es_logging_cleanup/giuliocalzolari-terraform-aws-es-cleanup-b36108f/variables.tf line 62, in variable "security_group_ids":
  62:   type        = list()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.