You can use Terraform to manage your Incident Management configuration through the Datadog API. This guide covers the Incident Management resources available in the Terraform registry and links to the corresponding Datadog documentation for each.
Configuring incident types, fields, roles, and notification rules by hand in the UI works well for a handful of teams. It becomes harder to scale as your organization grows, for example, when standardizing configuration across hundreds of teams or migrating from another incident management tool. Terraform lets you define this configuration as code, so you can create and update it programmatically and keep it consistent across your organization.
You can also import your existing incident type, notification, and postmortem template configurations into Terraform, and reference existing configurations as Terraform data sources.
The category of incident (for example, “Security Incident” or “Customer Impacting”). Also includes the settings on the Information page, such as private incidents and incident deletion. Anchors everything else in this table.
Structured data responders fill out on an incident, such as root cause or affected region. Also used to configure severity and status levels on the Information page.
Reusable message content for incident notifications.
Set up the Datadog Terraform provider
If you haven’t already, configure the Datadog Terraform provider to interact with Datadog APIs through a Terraform configuration.
Incident types
Incident types let you apply different settings, fields, roles, and notification behavior to different classes of incidents, such as security incidents versus customer-impacting incidents. Every other resource on this page is scoped to an incident type, so define your incident types first. Use the configuration block on the incident type resource to create incident types and set the toggles found on the Information page, such as incident deletion, test incidents, and private incidents. Severity and status levels, also found on the Information page, are configured with the incident user-defined field resource.
Property fields let responders capture structured data on an incident, for example, root cause or affected region. Use the incident user-defined field resource to create property fields and scope them to an incident type.
Responder types define the roles people can be assigned during an incident. Examples include Incident Commander or a custom role like Comms Lead. Use the incident user-defined role resource to create custom responder types. Scope each one to an incident type.
Notification rules determine when a notification fires, who it’s sent to, and which template it uses. Use the incident notification rule resource to create rules based on triggers such as incident creation or a saved change. Conditions on a rule can include severity or affected services.
Postmortem templates control where a postmortem document is generated for an incident type. Templates standardize the content a postmortem writer is expected to populate by defining specific sections and headers in the document. Use the incident postmortem template resource to configure this per incident type.
Notification templates define reusable message content for incident notifications. Use the incident notification template resource to create templates scoped to an incident type.