Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNS topic #1

Open
nickkostov opened this issue Oct 11, 2021 · 6 comments
Open

SNS topic #1

nickkostov opened this issue Oct 11, 2021 · 6 comments

Comments

@nickkostov
Copy link

How could I use an already existing SNS topic?
Can I define it in terraform.tfvars and get it from there?
I am unable to find information regarding that and how can I integrate it.

@feraudet
Copy link
Contributor

Hello,
This module does not create an SNS topic for you, you need to use an already existing topic specified in sns_topic arg

module "health_check-google" {
  version           = "1.0.3"
  source            = "Nuagic/route53-health-check/aws"
  fqdn              = "www.google.com"
  port              = 443
  type              = "HTTPS"
  resource_path     = "/"
  failure_threshold = "5"
  request_interval  = "30"
  sns_topic         = aws_sns_topic.alarms.id
  name              = "Google alarm"
}
```

@nickkostov
Copy link
Author

To get this straight:

resource "aws_cloudwatch_metric_alarm" "alarm" {
  alarm_name          = "${var.name}_alarm_healthcheck_failed"
  namespace           = "AWS/Route53"
  metric_name         = "HealthCheckStatus"
  comparison_operator = "LessThanThreshold"
  evaluation_periods  = "1"
  period              = "60"
  statistic           = "Minimum"
  threshold           = "1"
  unit                = "None"

  dimensions = {
    HealthCheckId = aws_route53_health_check.check.id
  }

  alarm_description         = "This metric monitors ${var.name} whether the service endpoint is down or not."
  ok_actions             = [nameofsnstopic]
  alarm_actions             = [nameofsnstopic]
  insufficient_data_actions = [nameofsnstopic]
  treat_missing_data        = "breaching"
}

@nickkostov
Copy link
Author

Last one is it defined with the [] brackets?

@feraudet
Copy link
Contributor

Are you using the module itself or the code inside ?
Which Terraform version are you using, this module need some modification to work under terraform > 0.13

@nickkostov
Copy link
Author

Your version of Terraform is out of date! The latest version
is 1.0.8.

@feraudet
Copy link
Contributor

LOL, thanks for the information !
Have a look on the last commit you will understand what I mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants