Ressourcen
uptimeify_user_notification_settings
Ressource uptimeify_user_notification_settings: Beispiel, alle Attribute, Import.
Die Beschreibungen auf dieser Seite kommen direkt aus dem Provider-Schema und sind deshalb englisch.
Personal Incident Management notification settings of one user of the organization, set by an organization admin (PUT /api/im/users/{userId}/notification-settings). The last write wins: the user can change them afterwards, which shows up as drift. Destroying only removes them from the state, the user keeps the chain. Import with the user id.
Beispiel
# An org admin sets up how a responder is paged. SMS and voice steps wait until the
# responder confirms the number (they are asked to on their next sign-in).
data "uptimeify_user" "rita" {
email = "rita@example.com"
}
resource "uptimeify_user_notification_settings" "rita" {
user_id = data.uptimeify_user.rita.id
phone_number = "+491701234567"
rules = [
{ urgency = "high", delay_minutes = 0, channel = "push" },
{ urgency = "high", delay_minutes = 5, channel = "sms" },
{ urgency = "high", delay_minutes = 15, channel = "voice" },
{ urgency = "low", delay_minutes = 0, channel = "email" },
]
}Schema
Pflichtfelder
rules(Attributes Set) The whole notification chain; replaces every existing rule of the user. (siehe verschachteltes Schema)user_id(String) User of this organization with role admin, editor or responder.
Optional
channels(Map of Boolean) Delivery switchespush,sms,voice,email. Unset = on exactly for the channels the rules use.phone_number(String) E.164 number, e.g.+491701234567. Unset = keep the user's number. A new number is unverified until the user confirms the SMS code.
Nur lesbar
id(String) The user id.phone_verified(Boolean) Whether the user confirmed the number. Until thensmsandvoicesteps are skipped.
Verschachteltes Schema für rules
Required:
channel(String)push,sms,voiceoremail.smsandvoicewait until the phone number is verified.delay_minutes(Number) Minutes after the page starts, 0 to 1440.urgency(String)highorlow.
Import
Import geht so:
Mit tofu import bzw. terraform import, zum Beispiel:
# The import id is the user id.
terraform import uptimeify_user_notification_settings.rita usr_8f2c