Skip to main content
View SourceRelease Notes

ElastAlert

This folder contains a Terraform module to deploy ElastAlert on top of an Auto Scaling Group of exactly one EC2 instance.

The idea is to create an Amazon Machine Image (AMI) that has ElastAlert installed using the install-elastalert module.

Reference

Required

ami_idstringrequired

The ID of the AMI to run in this cluster.

instance_typestringrequired

The type of EC2 Instances to run for each node in the cluster (e.g. t2.micro).

subnet_idslist(string)required

The subnet IDs into which the EC2 Instances should be deployed.

user_datastringrequired

A User Data script to execute while the server is booting.

vpc_idstringrequired

The ID of the VPC in which to deploy the kibana cluster

Optional

allow_ssh_from_cidr_blockslist(string)optional

A list of IP address ranges in CIDR format from which SSH access will be permitted. Attempts to access the bastion host from all other IP addresses will be blocked.

[]

The IDs of security groups from which SSH connections will be allowed. If you update this variable, make sure to update num_ssh_security_group_ids too!

[]

If set to true, associate a public IP address with each EC2 Instance in the cluster.

false
instance_profile_pathstringoptional

Path in which to create the IAM instance profile.

"/"
min_elb_capacitynumberoptional

Wait for this number of EC2 Instances to show up healthy in the load balancer on creation.

0
name_prefixstringoptional

The module's name that will be used to prefix various AWS resource names.

"elastalert-"

The number of security group IDs in allow_ssh_from_security_group_ids. We should be able to compute this automatically, but due to a Terraform limitation, if there are any dynamic resources in allow_ssh_from_security_group_ids, then we won't be able to: https://github.com/hashicorp/terraform/pull/11482

0
ssh_key_namestringoptional

The name of an EC2 Key Pair that can be used to SSH to the EC2 Instances in this cluster. Set to an empty string to not associate a Key Pair.

null
ssh_portnumberoptional

The port used for SSH connections

22
tagslist(object(…))optional

List fo extra tag blocks added to the autoscaling group configuration. Each element in the list is a map containing keys 'key', 'value', and 'propagate_at_launch' mapped to the respective values.

list(object({
key = string
value = string
propagate_at_launch = bool
}))
[]
Example
   default = [
{
key = "foo"
value = "bar"
propagate_at_launch = true
}
]

target_group_arnslist(string)optional

A list of target group ARNs to associate with the Kibana cluster.

[]

A maximum duration that Terraform should wait for the EC2 Instances to be healthy before timing out.

"10m"