published on Friday, Oct 30, 2026 by zenduty
published on Friday, Oct 30, 2026 by zenduty
zenduty.IncidentType manages an incident type: its name, whether it is the account default, which built-in form sections it shows and which custom fields (from zenduty.IncidentCustomField) it carries. An account can have up to 10 active incident types.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";
const outage = new zenduty.IncidentType("outage", {
name: "Outage",
isDefault: true,
formToggles: {
impacted_services: true,
responders: true,
},
customFields: [
{
customField: region.id,
required: true,
defaultValue: JSON.stringify("eu-west"),
},
{
customField: ticket.id,
},
],
});
import pulumi
import json
import pulumi_zenduty as zenduty
outage = zenduty.IncidentType("outage",
name="Outage",
is_default=True,
form_toggles={
"impacted_services": True,
"responders": True,
},
custom_fields=[
{
"custom_field": region["id"],
"required": True,
"default_value": json.dumps("eu-west"),
},
{
"custom_field": ticket["id"],
},
])
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/v2/zenduty"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal("eu-west")
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = zenduty.NewIncidentType(ctx, "outage", &zenduty.IncidentTypeArgs{
Name: pulumi.String("Outage"),
IsDefault: pulumi.Bool(true),
FormToggles: pulumi.BoolMap{
"impacted_services": pulumi.Bool(true),
"responders": pulumi.Bool(true),
},
CustomFields: zenduty.IncidentTypeCustomFieldArray{
&zenduty.IncidentTypeCustomFieldArgs{
CustomField: pulumi.Any(region.Id),
Required: pulumi.Bool(true),
DefaultValue: pulumi.String(json0),
},
&zenduty.IncidentTypeCustomFieldArgs{
CustomField: pulumi.Any(ticket.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Zenduty = Pulumi.Zenduty;
return await Deployment.RunAsync(() =>
{
var outage = new Zenduty.IncidentType("outage", new()
{
Name = "Outage",
IsDefault = true,
FormToggles =
{
{ "impacted_services", true },
{ "responders", true },
},
CustomFields = new[]
{
new Zenduty.Inputs.IncidentTypeCustomFieldArgs
{
CustomField = region.Id,
Required = true,
DefaultValue = JsonSerializer.Serialize("eu-west"),
},
new Zenduty.Inputs.IncidentTypeCustomFieldArgs
{
CustomField = ticket.Id,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.IncidentType;
import com.pulumi.zenduty.IncidentTypeArgs;
import com.pulumi.zenduty.inputs.IncidentTypeCustomFieldArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var outage = new IncidentType("outage", IncidentTypeArgs.builder()
.name("Outage")
.isDefault(true)
.formToggles(Map.ofEntries(
Map.entry("impacted_services", true),
Map.entry("responders", true)
))
.customFields(
IncidentTypeCustomFieldArgs.builder()
.customField(region.id())
.required(true)
.defaultValue(serializeJson(
"eu-west"))
.build(),
IncidentTypeCustomFieldArgs.builder()
.customField(ticket.id())
.build())
.build());
}
}
resources:
outage:
type: zenduty:IncidentType
properties:
name: Outage
isDefault: true
formToggles:
impacted_services: true
responders: true
customFields:
- customField: ${region.id}
required: true
defaultValue:
fn::toJSON: eu-west
- customField: ${ticket.id}
Example coming soon!
Deletion
Deleting an incident type deactivates it (is_active = false) instead of removing it, so that existing incidents keep their type. The name stays reserved on the account; re-creating a type with the same name fails until the deactivated one is renamed in the web console.
Create IncidentType Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IncidentType(name: string, args?: IncidentTypeArgs, opts?: CustomResourceOptions);@overload
def IncidentType(resource_name: str,
args: Optional[IncidentTypeArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IncidentType(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_fields: Optional[Sequence[IncidentTypeCustomFieldArgs]] = None,
form_toggles: Optional[Mapping[str, bool]] = None,
incident_type_id: Optional[str] = None,
is_active: Optional[bool] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None)func NewIncidentType(ctx *Context, name string, args *IncidentTypeArgs, opts ...ResourceOption) (*IncidentType, error)public IncidentType(string name, IncidentTypeArgs? args = null, CustomResourceOptions? opts = null)
public IncidentType(String name, IncidentTypeArgs args)
public IncidentType(String name, IncidentTypeArgs args, CustomResourceOptions options)
type: zenduty:IncidentType
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "zenduty_incident_type" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args IncidentTypeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IncidentTypeArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IncidentTypeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IncidentTypeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IncidentTypeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var incidentTypeResource = new Zenduty.IncidentType("incidentTypeResource", new()
{
CustomFields = new[]
{
new Zenduty.Inputs.IncidentTypeCustomFieldArgs
{
CustomField = "string",
DefaultValue = "string",
Required = false,
},
},
FormToggles =
{
{ "string", false },
},
IncidentTypeId = "string",
IsActive = false,
IsDefault = false,
Name = "string",
});
example, err := zenduty.NewIncidentType(ctx, "incidentTypeResource", &zenduty.IncidentTypeArgs{
CustomFields: zenduty.IncidentTypeCustomFieldArray{
&zenduty.IncidentTypeCustomFieldArgs{
CustomField: pulumi.String("string"),
DefaultValue: pulumi.String("string"),
Required: pulumi.Bool(false),
},
},
FormToggles: pulumi.BoolMap{
"string": pulumi.Bool(false),
},
IncidentTypeId: pulumi.String("string"),
IsActive: pulumi.Bool(false),
IsDefault: pulumi.Bool(false),
Name: pulumi.String("string"),
})
resource "zenduty_incident_type" "incidentTypeResource" {
lifecycle {
create_before_destroy = true
}
custom_fields {
custom_field = "string"
default_value = "string"
required = false
}
form_toggles = {
"string" = false
}
incident_type_id = "string"
is_active = false
is_default = false
name = "string"
}
var incidentTypeResource = new IncidentType("incidentTypeResource", IncidentTypeArgs.builder()
.customFields(IncidentTypeCustomFieldArgs.builder()
.customField("string")
.defaultValue("string")
.required(false)
.build())
.formToggles(Map.of("string", false))
.incidentTypeId("string")
.isActive(false)
.isDefault(false)
.name("string")
.build());
incident_type_resource = zenduty.IncidentType("incidentTypeResource",
custom_fields=[{
"custom_field": "string",
"default_value": "string",
"required": False,
}],
form_toggles={
"string": False,
},
incident_type_id="string",
is_active=False,
is_default=False,
name="string")
const incidentTypeResource = new zenduty.IncidentType("incidentTypeResource", {
customFields: [{
customField: "string",
defaultValue: "string",
required: false,
}],
formToggles: {
string: false,
},
incidentTypeId: "string",
isActive: false,
isDefault: false,
name: "string",
});
type: zenduty:IncidentType
properties:
customFields:
- customField: string
defaultValue: string
required: false
formToggles:
string: false
incidentTypeId: string
isActive: false
isDefault: false
name: string
IncidentType Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IncidentType resource accepts the following input properties:
- Custom
Fields List<IncidentType Custom Field> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- Form
Toggles Dictionary<string, bool> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - Incident
Type stringId - The unique_id of the incident type.
- Is
Active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - Is
Default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - Name string
- Name of the type, unique within the account.
- Custom
Fields []IncidentType Custom Field Args - Custom fields on the type's incident form, one block per field. The block order is the display order.
- Form
Toggles map[string]bool - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - Incident
Type stringId - The unique_id of the incident type.
- Is
Active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - Is
Default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - Name string
- Name of the type, unique within the account.
- custom_
fields list(object) - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form_
toggles map(bool) - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident_
type_ stringid - The unique_id of the incident type.
- is_
active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is_
default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name string
- Name of the type, unique within the account.
- custom
Fields List<IncidentType Custom Field> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles Map<String,Boolean> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type StringId - The unique_id of the incident type.
- is
Active Boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default Boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name String
- Name of the type, unique within the account.
- custom
Fields IncidentType Custom Field[] - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles {[key: string]: boolean} - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type stringId - The unique_id of the incident type.
- is
Active boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name string
- Name of the type, unique within the account.
- custom_
fields Sequence[IncidentType Custom Field Args] - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form_
toggles Mapping[str, bool] - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident_
type_ strid - The unique_id of the incident type.
- is_
active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is_
default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name str
- Name of the type, unique within the account.
- custom
Fields List<Property Map> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles Map<Boolean> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type StringId - The unique_id of the incident type.
- is
Active Boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default Boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name String
- Name of the type, unique within the account.
Outputs
All input properties are implicitly available as output properties. Additionally, the IncidentType resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing IncidentType Resource
Get an existing IncidentType resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IncidentTypeState, opts?: CustomResourceOptions): IncidentType@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_fields: Optional[Sequence[IncidentTypeCustomFieldArgs]] = None,
form_toggles: Optional[Mapping[str, bool]] = None,
incident_type_id: Optional[str] = None,
is_active: Optional[bool] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None) -> IncidentTypefunc GetIncidentType(ctx *Context, name string, id IDInput, state *IncidentTypeState, opts ...ResourceOption) (*IncidentType, error)public static IncidentType Get(string name, Input<string> id, IncidentTypeState? state, CustomResourceOptions? opts = null)public static IncidentType get(String name, Output<String> id, IncidentTypeState state, CustomResourceOptions options)resources: _: type: zenduty:IncidentType get: id: ${id}import {
to = zenduty_incident_type.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Custom
Fields List<IncidentType Custom Field> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- Form
Toggles Dictionary<string, bool> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - Incident
Type stringId - The unique_id of the incident type.
- Is
Active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - Is
Default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - Name string
- Name of the type, unique within the account.
- Custom
Fields []IncidentType Custom Field Args - Custom fields on the type's incident form, one block per field. The block order is the display order.
- Form
Toggles map[string]bool - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - Incident
Type stringId - The unique_id of the incident type.
- Is
Active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - Is
Default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - Name string
- Name of the type, unique within the account.
- custom_
fields list(object) - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form_
toggles map(bool) - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident_
type_ stringid - The unique_id of the incident type.
- is_
active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is_
default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name string
- Name of the type, unique within the account.
- custom
Fields List<IncidentType Custom Field> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles Map<String,Boolean> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type StringId - The unique_id of the incident type.
- is
Active Boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default Boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name String
- Name of the type, unique within the account.
- custom
Fields IncidentType Custom Field[] - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles {[key: string]: boolean} - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type stringId - The unique_id of the incident type.
- is
Active boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name string
- Name of the type, unique within the account.
- custom_
fields Sequence[IncidentType Custom Field Args] - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form_
toggles Mapping[str, bool] - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident_
type_ strid - The unique_id of the incident type.
- is_
active bool - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is_
default bool - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name str
- Name of the type, unique within the account.
- custom
Fields List<Property Map> - Custom fields on the type's incident form, one block per field. The block order is the display order.
- form
Toggles Map<Boolean> - Built-in incident form sections shown for this type, e.g.
impacted_services,responders. - incident
Type StringId - The unique_id of the incident type.
- is
Active Boolean - Whether the type can be picked for new incidents. Defaults to
true. The API always creates a type active; withfalsethe provider deactivates it right after creation. - is
Default Boolean - Whether this is the account's default incident type. Setting it clears the flag on the previous default. Defaults to
false. - name String
- Name of the type, unique within the account.
Supporting Types
IncidentTypeCustomField, IncidentTypeCustomFieldArgs
- Custom
Field string - The unique_id of the
zenduty.IncidentCustomField. - Default
Value string - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - Required bool
- Whether the field must be filled. Defaults to
false.
- Custom
Field string - The unique_id of the
zenduty.IncidentCustomField. - Default
Value string - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - Required bool
- Whether the field must be filled. Defaults to
false.
- custom_
field string - The unique_id of the
zenduty.IncidentCustomField. - default_
value string - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - required bool
- Whether the field must be filled. Defaults to
false.
- custom
Field String - The unique_id of the
zenduty.IncidentCustomField. - default
Value String - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - required Boolean
- Whether the field must be filled. Defaults to
false.
- custom
Field string - The unique_id of the
zenduty.IncidentCustomField. - default
Value string - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - required boolean
- Whether the field must be filled. Defaults to
false.
- custom_
field str - The unique_id of the
zenduty.IncidentCustomField. - default_
value str - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - required bool
- Whether the field must be filled. Defaults to
false.
- custom
Field String - The unique_id of the
zenduty.IncidentCustomField. - default
Value String - Default value as JSON:
jsonencode("eu-west"),jsonencode(3)orjsonencode(["a", "b"])for a multiselect. Validated against the field's type. Leave it unset to inherit the default from the field definition'sproperties; setting it to that same value is read back as unset and shows a permanent diff, so only set it to override. - required Boolean
- Whether the field must be filled. Defaults to
false.
Import
hcl
resource “zenduty_incident_type” “outage” {
}
$ pulumi import zenduty:index/incidentType:IncidentType outage incident_type_id`
$ terraform state show zenduty_incident_type.outage
* copy the output data and paste inside zenduty_incident_type.outage resource block and remove the id attribute
$ pulumi preview to verify the import
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- zenduty zenduty/terraform-provider-zenduty
- License
- Notes
- This Pulumi package is based on the
zendutyTerraform Provider.
published on Friday, Oct 30, 2026 by zenduty