Skip to main content
The Autter Terraform provider manages your Runtime configuration as code. It calls the public API. It manages these resources:
  • autter_alert_rule: an alert rule in a repository.
  • autter_synthetic_check: a synthetic check. It supports http and journey checks.
  • autter_dashboard: a Runtime dashboard.
It also has two data sources, autter_repository and autter_repositories, which look up your repositories. The provider needs Terraform 1.5 or later (or OpenTofu).

Install the provider

Add the provider to required_providers:
Then run terraform init.

Create a token

  1. In the Autter app, open Settings → Keys and tokens and click Set up a key.
  2. Choose Run Autter in CI or a script and follow the prompts to create a personal access token.
  3. If you use Restrict scopes, give the token the api:read and api:write scopes. You can also leave scopes unrestricted.
A token scoped to MCP only is refused.

Configure the provider

Set the token in an environment variable:
Keep the token out of your configuration files and use the environment variable. If no token is set, Terraform stops and names api_token, AUTTER_API_TOKEN and the scopes you need.

Examples

Every resource takes a repository_id and a name. Together they identify the resource. Changing either one replaces it.

Repository data source

Look up a repository by full name (owner/repo, any case) or by short name. Use only one of the two. A short name that more than one repository has is an error that lists the candidates.

Alert rule

Synthetic check

The provider supports kind = "http" and kind = "journey". http is the default. A journey check replays a saved journey in a browser. It takes a journey_id, and url is the site origin with no path. Do not set method, headers, expected_status, body_contains, timeout_ms or latency_threshold_ms. interval_seconds is 900, 3600, 21600 or 86400.
See Journey checks.

Dashboard

Give every widget an id or none. If you leave layout out, each widget gets its default size. For every attribute, see the provider documentation on the Terraform Registry.

Start from an existing resource

You do not have to write the configuration yourself. An alert rule (repository Settings → Runtime), a synthetic check (Runtime → Checks) and a dashboard (Runtime → Dashboards) each have an Export as Terraform action. The export starts with the required_providers block. It then writes the autter_repository data source and the resource, with each attribute set to what Autter stores.
  1. Click Export as Terraform and save the HCL in your configuration.
  2. Add an import block, or run terraform import.
  3. Run terraform plan.
An alert rule or a dashboard imports with no changes. A synthetic check with headers exports each header as a sensitive variable, because Autter never returns header values. Set the variables, for example with TF_VAR_… environment variables. The plan then shows one in-place update that sends them. In the export, a dashboard filter with one value uses value, and a filter with a list uses values.

Import

The import ID is <repository>:<name>. The repository is its id or owner/repo. The name can contain colons.
You can also use an import block:
After an import, repository_id holds the repository’s id. You can skip the import. If you create a resource whose name is already in use, the provider adopts the existing one and replaces its settings with your configuration. The apply prints a warning. This is how you bring a repository’s starting alert rules and dashboards under Terraform.

Drift and normalization

Autter normalizes what it stores. It lowercases triggers, adds a trailing slash to https://example.com, and fills in default widget fields and layout. None of this shows as a change in terraform plan. If someone changes a resource in the Autter app, the next plan shows that field changing back to your configuration. Applying the same configuration twice sends nothing.

Headers are sensitive

A check’s header values are stored encrypted and never read back. Keep them in sensitive variables. The provider detects a header that someone adds or removes in the app. It does not detect a changed value under the same name.

Rate limits and body size

Each token can make 10 writes and 60 reads a minute through the API. The limit is separate from the token’s MCP limit. The provider sends writes one at a time. When it reaches the limit, it waits for the time in Retry-After and logs rate limit reached, waiting. A first apply of many resources takes about a minute for every ten resources. The API accepts JSON bodies up to 1 MB. A larger body is refused with 413 and the code invalid_argument.

Errors you may see