Tissue Mast has a Terraform provider. Channels, heartbeats, rotations, overrides and escalation policies can live in the same repo as the services they watch, and they change through the same pull requests.
It's tissue-systems/tissue, version 0.1.0, on both the Terraform registry and
the OpenTofu registry. Version 0.1.0 manages Mast and nothing else. It can't deploy a Cell
or create a database or a bucket on Tissue Cloud. The provider is called
tissue and not mast because Tissue Cloud resources will go into
the same provider, and they're coming soon.
If your team doesn't use Terraform, you don't need it for any of this. A
mast.toml and ribo mast apply keep the same setup in git without a
state file, and alert sources
as code covers both and when to pick which. Just don't point both at the same account,
because they'll keep undoing each other's changes.
Terraform lets you write down the infrastructure you want in text files and then makes
reality match them. You describe a DNS record, a bucket or a database in HCL, its
configuration language, run terraform plan, and it shows you exactly what it
would create, change or delete. If that looks right, terraform apply does it.
It remembers what it made in a state file, so the next plan only shows the difference between what's in your files and what's out there. If you change one line, the plan shows one change. If you delete a block, the plan deletes the thing it described.
Terraform itself doesn't know about any particular service. That's the job of providers, which are plugins that translate resource blocks into API calls. There are providers for AWS, GitHub, DNS hosts and thousands of other things, and Mast has one too.
Most of why people like it has to do with working in a team. The config sits in git, so every change has an
author, a review and a history. When you want to know why the backup alert stopped paging
the database team in March, you run git log.
Terraform was open source under the MPL until August 2023, when HashiCorp moved it to the
Business Source License. A group of companies that build on it forked the last MPL release
and called the fork OpenTofu. It's run by the Linux Foundation. You type
tofu instead of terraform, and your existing files work as they are.
For a provider, the two are close to interchangeable. Both talk to providers over the same
plugin protocol, so it's one binary either way. The difference is where they download it
from: Terraform looks in registry.terraform.io, OpenTofu in registry.opentofu.org. We're
listed in both, so the source = "tissue-systems/tissue" line below works
whichever one you run. Swap terraform for tofu in any command in
this post and it does the same thing.
Five resources:
tissue_mast_channel, a URL that turns what's sent to it into notifications on your team's phonestissue_mast_heartbeat, a channel that expects a beat on a schedule and pages when one is latetissue_mast_rotation, who's on call and when it hands overtissue_mast_override, someone covering someone else for a few daystissue_mast_policy, who gets paged next when nobody answers
And four data sources for reading things: tissue_mast_person finds a person on
the account by email, tissue_mast_people lists all of them,
tissue_mast_rotation tells you who's on call right now, and
tissue_mast_channel hands you the URL of a channel that was made somewhere else.
A few settings belong to the phone and not to the API, and the provider leaves them alone.
Letting a channel send at page priority, the one that gets through Do Not
Disturb, can only be switched on in the Mast app on the owner's phone. So the provider makes
channels at loud at most and reads back whatever the app holds. Any argument
you leave out of a block follows the app too. If people like to set their own quiet hours or
pick a sound on their phone, leave those out of the config and Terraform won't undo them on
the next apply.
In the dashboard, make an API token with the mast:read and
mast:write scopes and put it in TISSUE_TOKEN. You can put it in the
provider block instead, but then it ends up in your config and your plan output.
terraform {
required_providers {
tissue = {
source = "tissue-systems/tissue"
version = "~> 0.1"
}
}
}
provider "tissue" {} # reads TISSUE_TOKEN
$ export TISSUE_TOKEN=tok_...
$ terraform init
$ terraform plan
Ana and Ben take turns, a week each, handing over Monday at 09:00 Berlin time. People are looked up by email, so nobody has to go and find a user id:
data "tissue_mast_person" "ana" {
email = "ana@example.com"
}
data "tissue_mast_person" "ben" {
email = "ben@example.com"
}
resource "tissue_mast_rotation" "primary" {
name = "primary"
handoff = "weekly"
handoff_day = 0 # Monday
handoff_time = "09:00"
tz = "Europe/Berlin"
order = [data.tissue_mast_person.ana.user_id, data.tissue_mast_person.ben.user_id]
}
Whoever is first in order is on call from the day the rotation is made.
handoff can also be daily, biweekly, or
custom with a shift length in hours.
This policy pages whoever's on call. If they haven't acknowledged after five minutes it pages the other person, and after fifteen it pages everyone. An incident nobody touches starts over every half hour.
resource "tissue_mast_policy" "default" {
name = "default"
repeat_every_secs = 1800
steps = [
{ target = "oncall", rotation_id = tissue_mast_rotation.primary.id, priority = "page" },
{ target = "next", rotation_id = tissue_mast_rotation.primary.id, priority = "page", after_secs = 300 },
{ target = "everyone", priority = "page", after_secs = 900 },
]
}
after_secs counts from the step before, not from the start.
A channel for deploy failures, quiet overnight, using that policy:
resource "tissue_mast_channel" "deploys" {
name = "deploys"
default_priority = "loud"
sound = "chirp"
# Quiet from 22:00 to 07:00 Berlin time, in minutes past midnight.
quiet_start = 1320
quiet_end = 420
quiet_tz = "Europe/Berlin"
policy_id = tissue_mast_policy.default.id
}
The channel's URL comes back as an attribute. It carries the key, so anyone holding it can send to the channel, and the provider marks it sensitive. It's still a normal value inside Terraform, though, which means you can hand it straight to whatever does the sending instead of copying it out of the app. With the GitHub provider, for example, it becomes an Actions secret:
resource "github_actions_secret" "mast" {
repository = "api"
secret_name = "MAST_DEPLOYS_URL"
plaintext_value = tissue_mast_channel.deploys.url
}
And a failing deploy job sends to it:
- name: Tell Mast
if: failure()
run: curl -fsS -d "deploy of ${{ github.sha }} failed" "$MAST_DEPLOYS_URL"
env:
MAST_DEPLOYS_URL: ${{ secrets.MAST_DEPLOYS_URL }}
Like every sensitive value, the URL is in your Terraform state in plain text. Keep state somewhere you'd keep a password.
A heartbeat is for jobs that are supposed to report in, like backups and cron jobs. It pages when the report doesn't arrive in time. This one expects the nightly backup to check in after it starts at 03:00, and pages if nothing has arrived by 03:30:
resource "tissue_mast_heartbeat" "backup" {
name = "nightly-backup"
schedule = "0 3 * * *"
schedule_tz = "America/Los_Angeles"
grace_secs = 1800
host = "db1"
}
The backup script requests the heartbeat's URL as its last step. For a worker that should check
in every five minutes, use period_secs instead of a schedule, and
fail_threshold if one missed beat isn't worth waking anyone for:
resource "tissue_mast_heartbeat" "queue" {
name = "queue-worker"
period_secs = 300
grace_secs = 120
fail_threshold = 2
}
Ben covers Ana over Christmas. That's a small PR someone can review, and you delete the block in January:
resource "tissue_mast_override" "holiday" {
rotation_id = tissue_mast_rotation.primary.id
user_id = data.tissue_mast_person.ben.user_id
covers_user_id = data.tissue_mast_person.ana.user_id
start = "2026-12-24"
end = "2026-12-26"
}
If you'd rather everyone on the account was in one rotation without listing them,
tissue_mast_people does that:
data "tissue_mast_people" "all" {}
resource "tissue_mast_rotation" "everyone" {
name = "everyone"
order = data.tissue_mast_people.all.people[*].user_id
}
You don't have to start over. Every resource can be imported, and channels, heartbeats, rotations and policies can be imported by name:
$ terraform import tissue_mast_channel.deploys deploys
$ terraform import tissue_mast_rotation.primary primary
$ terraform import tissue_mast_override.holiday primary/ov_51c7a3e0d2b94f18
Overrides take the rotation and the override id with a slash between them. On Terraform
1.5 or later, or OpenTofu 1.6 or later, you can skip writing the blocks yourself. Put
import blocks in a file and let plan write the config:
import {
to = tissue_mast_channel.deploys
id = "deploys"
}
$ terraform plan -generate-config-out=mast.tf
Check what it wrote and trim it. The generated blocks spell out every argument, including the ones you'd rather leave to the app.
Opsgenie shuts down on 5 April 2027, and a lot of Opsgenie setups are managed through its Terraform provider. Moving to a pager without one means going back to clicking, which is a big part of why we built this one.
The Mast importer, in the web app or as ribo mast import opsgenie, reads your
Opsgenie account and builds the same schedules, overrides and escalations in Mast. When
the import in the web app finishes, it also gives you an import block for
everything it made, with Copy and Download buttons, so you don't have to look up any ids.
The same blocks from ribo are coming soon.
The Opsgenie guide has the rest.
We wrote the provider by hand in Go instead of generating it from our API spec. Generated providers tend to show a diff on every plan for fields the server fills in or tidies up. After a few weeks of that, people stop reading their plans. The tests run real Terraform against a fake of the Mast API that fills in, trims and rewrites fields the same way the server does, so they never touch anyone's account.
Mast probes and status pages aren't in 0.1.0, and neither is anything for Tissue Cloud. Both are coming soon. Until then, probes and status pages are set up in the Mast app. The source is on GitHub at tissue-systems/terraform-provider-tissue, and the full reference for every argument is on the Terraform registry.