Skip to content

north-kite/terraform-aws-gatus

Repository files navigation

Gatus AWS Terraform Module

Terraform module to deploy Gatus on AWS

Terraform Module Documentation

This documentation is generated using https://terraform-docs.io

To update these docs run terraform-docs . from this directory.

Requirements

Name Version
terraform >= 1.5.0
aws >= 4.0

Providers

Name Version
aws 4.67.0

Modules

No modules.

Resources

Name Type
aws_alb_listener_rule.alb resource
aws_ecs_service.gatus resource
aws_ecs_task_definition.gatus resource
aws_iam_role.gatus resource
aws_lb.alb resource
aws_lb_listener.alb resource
aws_lb_target_group.alb resource
aws_security_group.gatus resource
aws_security_group.gatus_alb resource
aws_security_group_rule.gatus_alb_egress resource
aws_security_group_rule.gatus_alb_ingress resource
aws_security_group_rule.gatus_ingress_from_alb resource
aws_iam_policy_document.ecs_assume_role_policy data source
aws_subnet.gatus data source

Inputs

Name Description Type Default Required
alb (Optional) ARN and security group ID of existing application load balancer to attach Gatus too. If unspecified then an ALB will be created.
object({
arn = string
security_group_id = string
})
null no
alb_listener_config Map of config for application load balancer listeners
object({
port = number
health_check_port = number
protocol = string # HTTP or HTTPS
allowed_cidr_blocks = list(string)
certificate_arn = string # required if protocol is HTTPS
path = string
})
n/a yes
config_path (Optional) File location of config files within container string "/config/" no
cpu (Optional) CPU to allocate to each Gatus number 256 no
database (Optional) Database name and connection details. If set, these will be added to container environment variables for use in Gatus config. ARNs of Secret Manager secrets or Parameter Store parameters should be provided for user and password.
object({
host = string
port = number
name = string
user_arn = string
password_arn = string
})
null no
ecs_cluster ECS Cluster to deploy to
object({
arn = string
name = string
})
n/a yes
enable_execute_command (Optional) Enable Amazon ECS Exec for tasks bool true no
env Environment name, used in resource names (e.g. dev, stage, prod) string n/a yes
env_vars (Optional) Map of environment variables to add to the container. This can be referenced in the Gatus config files. e.g. { FRONT_END = "https://example.com" } map(string) {} no
execution_role_arn (Optional) ARN of the IAM role to launch the ECS task string n/a yes
image (Optional) Container image URI to use for Gatus string "twinproduction/gatus:v4.2.0" no
log_group (Optional) The CloudWatch Log Group for service to send logs to
object({
arn = string
region = string
})
null no
memory (Optional) Memory to allocate to each Gatus number 512 no
platform_version (Optional) ECS Fargate platform version string "1.4.0" no
public (Optional) If true then containers will be assigned public IPs and ALB will be made public. bool false no
secrets (Optional) Map of secrets to add to the container. The values should be ARNs for Secrets Manager or SSM Parameter Store map(string) {} no
security_groups (Optional) List of additional security group IDs to assign to the service list(string) [] no
service_name (Optional) Name of the service/product/application this Gatus belongs to string "my-service" no
size (Optional) Number of ECS tasks to run
object({
min = number
max = number
desired = number
})
{
"desired": 1,
"max": 2,
"min": 0
}
no
subnets List of subnet IDs to deploy the service to set(string) n/a yes
use_fargate (Optional) Launch on Fargate. If set to false then EC2 will be used bool true no
vpc_id VPC that resources should be deployed to string n/a yes

Outputs

Name Description
alb_dns_name Application loadbalancer DNS name. This DNS name can be used directly or in a custom DNS record.
security_group_id Security group assigned to Gatus container. Add rules here to grant Gatus access to endpoint to monitor.