Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tolga-cddo committed Nov 11, 2024
1 parent 4d263e9 commit 26e691e
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions basic-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ resource "aws_sns_topic_subscription" "email_subscription" {
endpoint = var.email
}

# resource "aws_route53_health_check" "health_check" {
# fqdn = var.fqdn
# type = "HTTPS_STR_MATCH"
# port = var.port
# resource_path = var.resource_path
# request_interval = var.request_interval
# failure_threshold = var.failure_threshold
# search_string = var.search_string
# regions = var.health_check_regions
# tags = {
# Name = "${local.service_name_w}-health-check"
# }

# }


# health checks for HTTPS_STR_MATCH
resource "aws_route53_health_check" "health_check_str_match" {
for_each = { for i, endpoint in var.endpoints : i => endpoint if endpoint.type == "HTTPS_STR_MATCH" }

Expand All @@ -42,7 +25,6 @@ resource "aws_route53_health_check" "health_check_str_match" {
}
}

# health checks for HTTPS
resource "aws_route53_health_check" "health_check_https" {
for_each = { for i, endpoint in var.endpoints : i => endpoint if endpoint.type == "HTTPS" }

Expand All @@ -59,34 +41,6 @@ resource "aws_route53_health_check" "health_check_https" {
}
}


# resource "aws_cloudwatch_metric_alarm" "health_check_alarm" {
# alarm_name = "${local.service_name_w}-health-check-alarm"
# comparison_operator = "LessThanThreshold"
# evaluation_periods = 1
# metric_name = "HealthCheckStatus"
# namespace = "AWS/Route53"
# period = 60
# statistic = "Minimum"
# threshold = 1
# alarm_description = "This metric monitors route 53 healthchecks"
# actions_enabled = "true"
# alarm_actions = [
# aws_sns_topic.alarm_topic.arn
# ]
# ok_actions = [
# aws_sns_topic.alarm_topic.arn
# ]
# # treat_missing_data = "breaching"
# dimensions = {
# HealthCheckId = aws_route53_health_check.health_check.id
# }
# depends_on = [
# aws_route53_health_check.health_check,
# aws_sns_topic.alarm_topic
# ]
# }

resource "aws_cloudwatch_metric_alarm" "health_check_alarm" {
for_each = merge(
aws_route53_health_check.health_check_str_match,
Expand Down

0 comments on commit 26e691e

Please sign in to comment.