> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage your account with Terraform

> Manage incident.io configuration as code with our official Terraform provider

We maintain an [official Terraform provider](https://registry.terraform.io/providers/incident-io/incident/latest) for incident.io. With this provider you can manage account configuration such as:

* Custom fields
* Incident severities
* Incident roles
* Incident statuses
* Schedules
* Escalation paths
* Alert sources
* Alert routes
* Catalog types and entries
* Maintenance windows

This allows you to bring incident.io account configuration into the same code review and approval cycle as you'd use for other key infrastructure and allows syncing information about your infrastructure or organization into incident.io, such as a list of services or teams.

For resources like schedules, escalation paths, workflows, alert sources, and alert routes, you can configure them in the visual editor first and then export the generated Terraform config — so you don't have to write it from scratch.

As an example, this is how you might configure a custom field for affected services:

```hcl theme={null}
provider "incident" {}

resource "incident_custom_field" "impacted_services" {
  name        = "Impacted Services"
  description = "The services that are impacted by this incident."
  field_type  = "multi_select"
  required    = "always"

  show_before_creation      = true
  show_before_closure       = true
  show_before_update        = true
  show_in_announcement_post = true
}

resource "incident_custom_field_option" "impacted_services" {
  # Load this from your service catalog, config file, or anywhere.
  for_each = toset([
    "Payments Service",
    "API Gateway",
    "Transaction Ledger",
  ])

  custom_field_id = incident_custom_field.impacted_services.id
  value           = each.value
}
```

Full documentation on how to use the provider and all its resources can be found in the Terraform registry at [incident-io/incident](https://registry.terraform.io/providers/incident-io/incident/latest). This includes example code and attribute definitions.

<img src="https://mintcdn.com/incidentio-18bb4170/iopR3BNEfSUPs05k/images/help-centre/manage-your-account-with-terraform/screenshot-1.png?fit=max&auto=format&n=iopR3BNEfSUPs05k&q=85&s=5ea661c4d14d6dd82f00de707604ab3f" alt="Example usage for incident custom fields" width="2038" height="888" data-path="images/help-centre/manage-your-account-with-terraform/screenshot-1.png" />

If you need a refresher on how to provision your infrastructure with Terraform, check out Hashicorp's [tutorials and documentation](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/infrastructure-as-code).

In the meantime, if you run into any issues or if you have any feedback, please contact us at [help@incident.io](mailto:help@incident.io).

### Editing Terraform-managed resources in the UI

Once a resource is managed by Terraform, it becomes locked in the dashboard — you can't save changes directly. But you can still use the UI to compose changes visually:

1. Open the resource (e.g. a schedule or escalation path) in the dashboard
2. Make your changes in the visual editor
3. Instead of saving, click **Export** to get the updated `.tf` configuration
4. Review and apply via your normal Terraform workflow

This keeps Terraform as the source of truth while letting you use our powerful visual editor to draft changes.
