Send down and back-up alerts to Mattermost (#6)
The webhook address is private: uptime.config.ts names it as secret:MATTERMOST_WEBHOOK and the worker reads the Worker secret of that name (bound in deploy.tf from the GitHub Actions secret). The address is kept out of the logs. Alerts wait 3 minutes before saying something is down.
This commit is contained in:
1 parent
cf977e65da
commit
7c3eb7debd
5 files changed
+53
-5
No files matched your search
@@ -23,6 +23,12 @@ variable "APPS_US_EAST_TARGET" {
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "MATTERMOST_WEBHOOK" {
|
||||
# read from $TF_VAR_MATTERMOST_WEBHOOK (the GitHub Actions secret of the same name)
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "enable_do_migration" {
|
||||
type = bool
|
||||
default = false
|
||||
@@ -70,6 +76,10 @@ resource "cloudflare_workers_script" "uptimeflare_worker" {
|
||||
name = "APPS_US_EAST_TARGET"
|
||||
type = "secret_text"
|
||||
text = var.APPS_US_EAST_TARGET
|
||||
}, {
|
||||
name = "MATTERMOST_WEBHOOK"
|
||||
type = "secret_text"
|
||||
text = var.MATTERMOST_WEBHOOK
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user