Opinionated Terraform wrapper modules for managing UptimeRobot resources efficiently.
Note
This is an example setup. Adjust paths, module names, and versions according to your project needs.
Recommended folder structure:
terraform
├── monitors_toggle.tf
└── toggle
├── modules
│ ├── cron_monitor
│ └── http_monitor
└── README.mdmkdir terraform
git submodule add \
git@github.com:toggle-corp/fugit.git \
fugit
git submodule add \
git@github.com:toggle-corp/terraform-uptimerobot-modules.git \
terraform/toggleUpdate your .gitmodules file to use specific tagged branches:
# Sync this with ./fugit/scripts/sub-module-sync.sh
[submodule "terraform/toggle"]
path = terraform/toggle
url = git@github.com:toggle-corp/terraform-uptimerobot-modules.git
branch = v0.1.0
[submodule "fugit"]
path = fugit
url = git@github.com:toggle-corp/fugit.git
branch = v0.1.3Important
Replace v0.1.0 and v0.1.3 with the latest release tags from the respective repositories:
./fugit/scripts/sub-module-sync.shAdd and commit your submodule setup.
Create a monitor in monitors_toggle.tf:
module "monitor_toggle_website_prod" {
source = "./toggle/modules/http_monitor"
name = "Togglecorp"
url = "https://togglecorp.com"
tags = ["prod"]
assigned_alert_contacts = [
local.toggle_email_id,
local.thenav56_iphone_id,
uptimerobot_integration.toggle_uptime_alerts.id,
]
}