Terraform uptimerobot
This commit is contained in:
parent
f1c9e10d9a
commit
413400cbc6
5 changed files with 60 additions and 0 deletions
|
@ -78,6 +78,18 @@ provider "registry.terraform.io/linode/linode" {
|
|||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/vexxhost/uptimerobot" {
|
||||
version = "0.8.2"
|
||||
constraints = "0.8.2"
|
||||
hashes = [
|
||||
"h1:TiAJg4VrgNreABRH7uTFg8HOp0KY53iVw/M+MVO0D9Y=",
|
||||
"zh:348b22a27496b3f88103f6a08791d51531b0b20c35a7cf32c7dcf6a9a5b58d26",
|
||||
"zh:77cdae6f3c852c677a70be4bc335372aba7ceef9556d4b4427bbc683030d5f7d",
|
||||
"zh:7ef18e4bae4d9e92bdda3e4b5c633f1b7e614a9f8613df01d88334a4d86b1f99",
|
||||
"zh:aa46d603a3dce7651ebb84e6b2b0419010594efbc8ab2d57c9f4906590f2c43f",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/vultr/vultr" {
|
||||
version = "2.1.4"
|
||||
constraints = "2.1.4"
|
||||
|
|
|
@ -16,3 +16,7 @@ provider "aws" {
|
|||
provider "linode" {
|
||||
token = var.linode_personal_access_token
|
||||
}
|
||||
|
||||
provider "uptimerobot" {
|
||||
api_key = var.uptimerobot_api_key
|
||||
}
|
||||
|
|
|
@ -16,5 +16,9 @@ terraform {
|
|||
source = "linode/linode"
|
||||
version = "1.25.1"
|
||||
}
|
||||
uptimerobot = {
|
||||
source = "vexxhost/uptimerobot"
|
||||
version = "0.8.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
39
terraform/uptimerobot.tf
Normal file
39
terraform/uptimerobot.tf
Normal file
|
@ -0,0 +1,39 @@
|
|||
resource "uptimerobot_monitor" "vps_ping" {
|
||||
for_each = {
|
||||
casey = linode_instance.casey.ip_address
|
||||
walker = vultr_instance.walker.main_ip
|
||||
decker = linode_instance.decker.ip_address
|
||||
grimes = vultr_instance.grimes.main_ip
|
||||
}
|
||||
|
||||
friendly_name = title(each.key)
|
||||
type = "ping"
|
||||
url = each.value
|
||||
interval = 600
|
||||
}
|
||||
|
||||
resource "uptimerobot_monitor" "website" {
|
||||
friendly_name = "Personal website"
|
||||
type = "http"
|
||||
url = "https://theorangeone.net/.health/"
|
||||
interval = 300
|
||||
}
|
||||
|
||||
resource "uptimerobot_monitor" "grafana" {
|
||||
friendly_name = "Grafana"
|
||||
type = "http"
|
||||
url = "https://grafana.jakehoward.tech/api/health"
|
||||
interval = 300
|
||||
}
|
||||
|
||||
resource "uptimerobot_monitor" "whoami" {
|
||||
friendly_name = "Whoami"
|
||||
type = "http"
|
||||
url = "https://whoami.theorangeone.net"
|
||||
interval = 300
|
||||
}
|
||||
|
||||
resource "uptimerobot_status_page" "main" {
|
||||
friendly_name = "TheOrangeOne"
|
||||
sort = "a-z"
|
||||
}
|
|
@ -2,3 +2,4 @@ variable "vultr_api_key" {}
|
|||
variable "cloudflare_api_key" {}
|
||||
variable "cloudflare_email" {}
|
||||
variable "linode_personal_access_token" {}
|
||||
variable "uptimerobot_api_key" {}
|
||||
|
|
Loading…
Reference in a new issue