lambda-elasticsearch-cleanup
cloudposse/lambda-elasticsearch-cleanup/aws
Terraform module to provision a scheduled Lambda function which will delete old AWS ElasticSearch indices
Terraform module to provision a scheduled Lambda function which will delete old Elasticsearch indexes using SigV4Auth authentication. The lambda function can optionally send output to an SNS topic if the topic ARN is given. This module was largely inspired by aws-lambda-es-cleanup > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running <
| Name | Type | Description | Default |
|---|---|---|---|
| es_endpoint | string | The Elasticsearch endpoint for the Lambda function to connect to | required |
| es_domain_arn | string | The Elasticsearch domain ARN | required |
| es_security_group_id | string | The Elasticsearch cluster security group ID | required |
| subnet_ids | list(string) | Subnet IDs | required |
| vpc_id | string | The VPC ID for the Lambda function | required |
| attributes | list(string) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, | [] |
| labels_as_tags | set(string) | Set of labels (ID elements) to include as tags in the `tags` output. Default is | [
"default"
] |
| label_order | list(string) | The order in which the labels (ID elements) appear in the `id`. Defaults to ["na | null |
| index_re | string | Regular Expression that matches the index names to clean up (not including trail | ".*" |
| timeout | number | Timeout for Lambda function in seconds | 300 |
| tags | map(string) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t | {} |
| index_format | string | Combined with 'index' variable and is used to evaluate the index age | "%Y.%m.%d" |
| namespace | string | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp' | null |
| environment | string | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'st | null |
| additional_tag_map | map(string) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add | {} |
| descriptor_formats | any | Describe additional descriptors to be output in the `descriptors` output map. Ma | {} |
| artifact_url | string | URL template for the remote artifact | "https://artifacts.cloudposse.com/$${mod |
| tenant | string | ID element _(Rarely used, not included by default)_. A customer identifier, indi | null |
| id_length_limit | number | Limit `id` to this many characters (minimum 6). Set to `0` for unlimited length. | null |
| python_version | string | The Python version to use | "3.12" |
| stage | string | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bu | null |
| label_value_case | string | Controls the letter case of ID elements (labels) as included in `id`, set as tag | null |
| enabled | bool | Set to false to prevent the module from creating any resources | null |
| label_key_case | string | Controls the letter case of the `tags` keys (label names) for tags generated by | null |
| schedule | string | CloudWatch Events rule schedule using cron or rate expression | "cron(0 3 * * ? *)" |
security_group_id — Security Group ID of the Lambda Functionlambda_function_arn — ARN of the Lambda Functionlambda_function_source_code_size — The size in bytes of the function .zip fileAzure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,