uptimeify_maintenance_window
A maintenance window: alerts and incidents of its targets are suppressed while it runs. Set targets and/or tag_ids, or customer_id alone for the whole customer. A window with only organization-wide tags applies organization-wide. Import with the numeric id or the public id.
A maintenance window: alerts and incidents of its targets are suppressed while it runs. Set targets and/or tag_ids, or customer_id alone for the whole customer. A window with only organization-wide tags applies organization-wide. Import with the numeric id or the public id.
Example Usage
# Weekly Sunday-night window for every monitor tagged "production".
resource "uptimeify_maintenance_window" "patch_night" {
name = "Patch night"
description = "OS updates"
start_time = "2030-01-06T02:00:00+01:00"
end_time = "2030-01-06T04:00:00+01:00"
timezone = "Europe/Berlin"
tag_ids = [tonumber(uptimeify_tag.production.id)]
recurrence_pattern = {
frequency = "weekly"
days_of_week = [0]
}
}
# One-off window for two explicit monitors.
resource "uptimeify_maintenance_window" "migration" {
name = "DB migration"
start_time = "2030-03-01T22:00:00Z"
end_time = "2030-03-02T01:00:00Z"
targets = [
{ type = "website", id = 12 },
{ type = "dns", id = 7 },
]
}
# Every monitor of one customer.
resource "uptimeify_maintenance_window" "customer" {
name = "Customer move"
start_time = "2030-04-01T00:00:00Z"
end_time = "2030-04-01T06:00:00Z"
customer_id = 3
}Schema
Required
end_time(String) End, after start_time. RFC3339 timestamp. The API answers in UTC with milliseconds (2030-01-01T02:00:00.000Z); another spelling of the same instant is kept as written.name(String)start_time(String) Start. RFC3339 timestamp. The API answers in UTC with milliseconds (2030-01-01T02:00:00.000Z); another spelling of the same instant is kept as written.
Optional
customer_id(Number) Whole-customer window: every monitor of this customer. Cannot be combined withtargetsortag_ids; changing it replaces the window.description(String) At most 2000 characters.is_active(Boolean) Defaulttrue.recurrence_pattern(Attributes) Repeat the window. Unset = one-off window. (see below for nested schema)tag_ids(Set of Number) Numeric tag ids: every monitor carrying one of the tags is in maintenance.targets(Attributes Set) Monitors the window applies to. All targets must belong to one customer. (see below for nested schema)timezone(String) IANA zone the recurrence is read in, e.g.Europe/Berlin. Use the canonical name: the API stores aliases (utc,Japan) under their canonical spelling. DefaultUTC.
Read-Only
created_at(String)id(String) Numeric window id.public_id(String) Public UUID of the window.updated_at(String)
Nested Schema for recurrence_pattern
Required:
frequency(String)daily,weeklyormonthly.
Optional:
day_of_month(Number) Day of month, 1 to 31.days_of_week(List of Number) Weekdays, 0 = Sunday to 6 = Saturday.end_recurrence_date(String) Last date of the recurrence, e.g.2031-12-31or an RFC3339 timestamp.interval_count(Number) Repeat every N units of frequency (2 with weekly = every other week), 1 to 365. The API treats unset as 1.
Nested Schema for targets
Required:
id(Number) Numeric id of the monitor.type(String) One ofwebsite,dns,icmp,smtp,ssh,tcp,ftp,imap_pop,customer_domain,customer_ip.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Numeric id or public id
terraform import uptimeify_maintenance_window.patch_night 42uptimeify_imap_pop_monitor
An IMAP or POP3 monitor: logs in (check_mode protocol) or only checks the port (tcp, needs port). The hostname must resolve to a public address. Import with the numeric id or the public id.
uptimeify_monitor_tag
Puts one tag on one monitor. A monitor carries at most 5 tags. Import with <monitor_type>/<monitor_id>/<tag_id>.