/r53-healthchecks

Terraform module to configure route53 health checks

Primary LanguageHCLApache License 2.0Apache-2.0

aws-route53

This module can be used to create route53 healthchecks in AWS.

Usage


terraform {
  source = "git::git@"
}

inputs = {
  hosted_zone_domain  = "${get_env("CLUSTER_NAME")}.yourdomain.com"
  cluster_name        = get_env("CLUSTER_NAME")
  workload_account_id = get_env("AWS_ACCOUNT_ID")
  monitored_domains = {
    "exxchainge-fe" = {
      "name"   = "your-fe"
      "domain" = "www.yourdomain.com"
      "path"   = "/healthcheck"
    },
    "exxchainge-be" = {
      "name"   = "your-be"
      "domain" = "api.yourdomain.com"
      "path"   = "/actuator/health"
    }
  }
}

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws n/a
terraform n/a

Modules

No modules.

Resources

Name Type
aws_cloudwatch_metric_alarm.cw-alarm-healthcheck-fails resource
aws_kms_alias.healthchecks-topic-key resource
aws_kms_key.healthchecks-topic-key resource
aws_route53_health_check.r53-healthchecks resource
aws_sns_topic.sns-r53-healthcheck-topics resource
aws_sns_topic_subscription.aws-rds-sns-subscriptions resource
aws_iam_policy_document.cloudwatch_policy data source
aws_iam_policy_document.owner_and_cloudwatch_policy_merge data source
aws_iam_policy_document.owner_policy data source
terraform_remote_state.pagerduty data source

Inputs

Name Description Type Default Required
cluster_name AWS EKS cluster name of workloads any n/a yes
evaluation_periods Number of periods needed for an alarm to fail and trigger an event string "5" no
failure_threshold Interval in which the healthcheck will run against the monitored domains string "5" no
monitored_domains n/a map(map(string))
{
"dummykey": {
"dummykey": "dummyval"
}
}
no
period Length of a period an alarm takes to check for failures string "60" no
request_interval Interval in which the healthcheck will run against the monitored domains string "30" no
workload_account_id The AWS account of workload any n/a yes

Outputs

No outputs.