1. Registry
  2. Packages
  3. incident.io
  4. API Docs
  5. TeamGroupingPreference
Viewing docs for incident.io v0.4.1
published on Wednesday, Oct 21, 2026 by incident-io
incident logo incident.io
Viewing docs for incident.io v0.4.1
published on Wednesday, Oct 21, 2026 by incident-io

    Manage how each team’s alerts are grouped, on every alert route.

    A team’s grouping preference takes priority over the default grouping of any alert route its alerts match. A team without one groups by each route’s own settings.

    A team has at most one preference, and it cannot move to another team: changing teamId destroys the preference and creates one for the new team. The settings use the field names of an alert route’s groupingConfig, so a team’s preference can be written by copying the route block it replaces.

    Writing a preference needs team grouping preferences enabled for your organisation. Until then the API refuses to create, update or delete one, and this resource fails at apply with that message.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incident from "@incident-io/pulumi";
    
    // A team's grouping preference applies to that team's alerts on every alert route they
    // match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
    // so look the team up rather than hardcoding its ID.
    const team = incident.getCatalogType({
        name: "Team",
    });
    const platform = team.then(team => incident.getCatalogEntry({
        catalogTypeId: team.id,
        identifier: "Platform",
    }));
    // Group the Platform team's alerts by title and service, in a rolling 30 minute window.
    // The settings take the same field names as an alert route's grouping_config.
    const platformTeamGroupingPreference = new incident.TeamGroupingPreference("platform", {
        teamId: platform.then(platform => platform.id),
        "default": {
            settings: {
                enabled: true,
                windowType: "rolling",
                windowSeconds: 1800,
                groupingKeys: [
                    {
                        reference: "alert.title",
                    },
                    {
                        reference: "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE",
                    },
                ],
            },
        },
    });
    // A preference can also switch grouping off for a team, so none of its alerts group
    // however the routes they match are configured. A disabled preference carries no window
    // or keys.
    const payments = team.then(team => incident.getCatalogEntry({
        catalogTypeId: team.id,
        identifier: "Payments",
    }));
    const paymentsTeamGroupingPreference = new incident.TeamGroupingPreference("payments", {
        teamId: payments.then(payments => payments.id),
        "default": {
            settings: {
                enabled: false,
            },
        },
    });
    
    import pulumi
    import pulumi_incident as incident
    
    # A team's grouping preference applies to that team's alerts on every alert route they
    # match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
    # so look the team up rather than hardcoding its ID.
    team = incident.get_catalog_type(name="Team")
    platform = incident.get_catalog_entry(catalog_type_id=team.id,
        identifier="Platform")
    # Group the Platform team's alerts by title and service, in a rolling 30 minute window.
    # The settings take the same field names as an alert route's grouping_config.
    platform_team_grouping_preference = incident.TeamGroupingPreference("platform",
        team_id=platform.id,
        default={
            "settings": {
                "enabled": True,
                "window_type": "rolling",
                "window_seconds": 1800,
                "grouping_keys": [
                    {
                        "reference": "alert.title",
                    },
                    {
                        "reference": "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE",
                    },
                ],
            },
        })
    # A preference can also switch grouping off for a team, so none of its alerts group
    # however the routes they match are configured. A disabled preference carries no window
    # or keys.
    payments = incident.get_catalog_entry(catalog_type_id=team.id,
        identifier="Payments")
    payments_team_grouping_preference = incident.TeamGroupingPreference("payments",
        team_id=payments.id,
        default={
            "settings": {
                "enabled": False,
            },
        })
    
    package main
    
    import (
    	"github.com/incident-io/pulumi-incident/sdk/go/incident"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// A team's grouping preference applies to that team's alerts on every alert route they
    		// match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
    		// so look the team up rather than hardcoding its ID.
    		team, err := incident.GetCatalogType(ctx, &incident.LookupCatalogTypeArgs{
    			Name: pulumi.StringRef("Team"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		platform, err := incident.GetCatalogEntry(ctx, &incident.LookupCatalogEntryArgs{
    			CatalogTypeId: team.Id,
    			Identifier:    "Platform",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Group the Platform team's alerts by title and service, in a rolling 30 minute window.
    		// The settings take the same field names as an alert route's grouping_config.
    		_, err = incident.NewTeamGroupingPreference(ctx, "platform", &incident.TeamGroupingPreferenceArgs{
    			TeamId: pulumi.String(platform.Id),
    			Default: &incident.TeamGroupingPreferenceDefaultArgs{
    				Settings: &incident.TeamGroupingPreferenceDefaultSettingsArgs{
    					Enabled:       pulumi.Bool(true),
    					WindowType:    pulumi.String("rolling"),
    					WindowSeconds: pulumi.Int(1800),
    					GroupingKeys: incident.TeamGroupingPreferenceDefaultSettingsGroupingKeyArray{
    						&incident.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs{
    							Reference: pulumi.String("alert.title"),
    						},
    						&incident.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs{
    							Reference: pulumi.String("alert.attributes.01H5EXAMPLESERVICEATTRIBUTE"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// A preference can also switch grouping off for a team, so none of its alerts group
    		// however the routes they match are configured. A disabled preference carries no window
    		// or keys.
    		payments, err := incident.GetCatalogEntry(ctx, &incident.LookupCatalogEntryArgs{
    			CatalogTypeId: team.Id,
    			Identifier:    "Payments",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = incident.NewTeamGroupingPreference(ctx, "payments", &incident.TeamGroupingPreferenceArgs{
    			TeamId: pulumi.String(payments.Id),
    			Default: &incident.TeamGroupingPreferenceDefaultArgs{
    				Settings: &incident.TeamGroupingPreferenceDefaultSettingsArgs{
    					Enabled: pulumi.Bool(false),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incident = Pulumi.Incident;
    
    return await Deployment.RunAsync(() => 
    {
        // A team's grouping preference applies to that team's alerts on every alert route they
        // match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
        // so look the team up rather than hardcoding its ID.
        var team = Incident.GetCatalogType.Invoke(new()
        {
            Name = "Team",
        });
    
        var platform = Incident.GetCatalogEntry.Invoke(new()
        {
            CatalogTypeId = team.Apply(getCatalogTypeResult => getCatalogTypeResult.Id),
            Identifier = "Platform",
        });
    
        // Group the Platform team's alerts by title and service, in a rolling 30 minute window.
        // The settings take the same field names as an alert route's grouping_config.
        var platformTeamGroupingPreference = new Incident.TeamGroupingPreference("platform", new()
        {
            TeamId = platform.Apply(getCatalogEntryResult => getCatalogEntryResult.Id),
            Default = new Incident.Inputs.TeamGroupingPreferenceDefaultArgs
            {
                Settings = new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsArgs
                {
                    Enabled = true,
                    WindowType = "rolling",
                    WindowSeconds = 1800,
                    GroupingKeys = new[]
                    {
                        new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs
                        {
                            Reference = "alert.title",
                        },
                        new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs
                        {
                            Reference = "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE",
                        },
                    },
                },
            },
        });
    
        // A preference can also switch grouping off for a team, so none of its alerts group
        // however the routes they match are configured. A disabled preference carries no window
        // or keys.
        var payments = Incident.GetCatalogEntry.Invoke(new()
        {
            CatalogTypeId = team.Apply(getCatalogTypeResult => getCatalogTypeResult.Id),
            Identifier = "Payments",
        });
    
        var paymentsTeamGroupingPreference = new Incident.TeamGroupingPreference("payments", new()
        {
            TeamId = payments.Apply(getCatalogEntryResult => getCatalogEntryResult.Id),
            Default = new Incident.Inputs.TeamGroupingPreferenceDefaultArgs
            {
                Settings = new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsArgs
                {
                    Enabled = false,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incident.IncidentFunctions;
    import com.pulumi.incident.inputs.GetCatalogTypeArgs;
    import com.pulumi.incident.inputs.GetCatalogEntryArgs;
    import com.pulumi.incident.TeamGroupingPreference;
    import com.pulumi.incident.TeamGroupingPreferenceArgs;
    import com.pulumi.incident.inputs.TeamGroupingPreferenceDefaultArgs;
    import com.pulumi.incident.inputs.TeamGroupingPreferenceDefaultSettingsArgs;
    import com.pulumi.incident.inputs.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // A team's grouping preference applies to that team's alerts on every alert route they
            // match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
            // so look the team up rather than hardcoding its ID.
            final var team = IncidentFunctions.getCatalogType(GetCatalogTypeArgs.builder()
                .name("Team")
                .build());
    
            final var platform = IncidentFunctions.getCatalogEntry(GetCatalogEntryArgs.builder()
                .catalogTypeId(team.id())
                .identifier("Platform")
                .build());
    
            // Group the Platform team's alerts by title and service, in a rolling 30 minute window.
            // The settings take the same field names as an alert route's grouping_config.
            var platformTeamGroupingPreference = new TeamGroupingPreference("platformTeamGroupingPreference", TeamGroupingPreferenceArgs.builder()
                .teamId(platform.id())
                .default_(TeamGroupingPreferenceDefaultArgs.builder()
                    .settings(TeamGroupingPreferenceDefaultSettingsArgs.builder()
                        .enabled(true)
                        .windowType("rolling")
                        .windowSeconds(1800)
                        .groupingKeys(                    
                            TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs.builder()
                                .reference("alert.title")
                                .build(),
                            TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs.builder()
                                .reference("alert.attributes.01H5EXAMPLESERVICEATTRIBUTE")
                                .build())
                        .build())
                    .build())
                .build());
    
            // A preference can also switch grouping off for a team, so none of its alerts group
            // however the routes they match are configured. A disabled preference carries no window
            // or keys.
            final var payments = IncidentFunctions.getCatalogEntry(GetCatalogEntryArgs.builder()
                .catalogTypeId(team.id())
                .identifier("Payments")
                .build());
    
            var paymentsTeamGroupingPreference = new TeamGroupingPreference("paymentsTeamGroupingPreference", TeamGroupingPreferenceArgs.builder()
                .teamId(payments.id())
                .default_(TeamGroupingPreferenceDefaultArgs.builder()
                    .settings(TeamGroupingPreferenceDefaultSettingsArgs.builder()
                        .enabled(false)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Group the Platform team's alerts by title and service, in a rolling 30 minute window.
      # The settings take the same field names as an alert route's grouping_config.
      platformTeamGroupingPreference:
        type: incident:TeamGroupingPreference
        name: platform
        properties:
          teamId: ${platform.id}
          default:
            settings:
              enabled: true
              windowType: rolling
              windowSeconds: 1800
              groupingKeys:
                - reference: alert.title
                - reference: alert.attributes.01H5EXAMPLESERVICEATTRIBUTE
      paymentsTeamGroupingPreference:
        type: incident:TeamGroupingPreference
        name: payments
        properties:
          teamId: ${payments.id}
          default:
            settings:
              enabled: false
    variables:
      # A team's grouping preference applies to that team's alerts on every alert route they
      # match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
      # so look the team up rather than hardcoding its ID.
      team:
        fn::invoke:
          function: incident:getCatalogType
          arguments:
            name: Team
      platform:
        fn::invoke:
          function: incident:getCatalogEntry
          arguments:
            catalogTypeId: ${team.id}
            identifier: Platform
      # A preference can also switch grouping off for a team, so none of its alerts group
      # however the routes they match are configured. A disabled preference carries no window
      # or keys.
      payments:
        fn::invoke:
          function: incident:getCatalogEntry
          arguments:
            catalogTypeId: ${team.id}
            identifier: Payments
    
    pulumi {
      required_providers {
        incident = {
          source = "pulumi/incident"
        }
      }
    }
    
    data "incident_getcatalogtype" "team" {
      name = "Team"
    }
    data "incident_getcatalogentry" "platform" {
      catalog_type_id = data.incident_getcatalogtype.team.id
      identifier      = "Platform"
    }
    data "incident_getcatalogentry" "payments" {
      catalog_type_id = data.incident_getcatalogtype.team.id
      identifier      = "Payments"
    }
    
    # Group the Platform team's alerts by title and service, in a rolling 30 minute window.
    # The settings take the same field names as an alert route's grouping_config.
    resource "incident_teamgroupingpreference" "platform" {
      team_id = data.incident_getcatalogentry.platform.id
      default = {
        settings = {
          enabled        = true
          window_type    = "rolling"
          window_seconds = 1800
          grouping_keys = [{
            "reference" = "alert.title"
            }, {
            "reference" = "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE"
          }]
        }
      }
    }
    resource "incident_teamgroupingpreference" "payments" {
      team_id = data.incident_getcatalogentry.payments.id
      default = {
        settings = {
          enabled = false
        }
      }
    }
    # A team's grouping preference applies to that team's alerts on every alert route they
    # match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
    # so look the team up rather than hardcoding its ID.
    # A preference can also switch grouping off for a team, so none of its alerts group
    # however the routes they match are configured. A disabled preference carries no window
    # or keys.
    

    Create TeamGroupingPreference Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TeamGroupingPreference(name: string, args: TeamGroupingPreferenceArgs, opts?: CustomResourceOptions);
    @overload
    def TeamGroupingPreference(resource_name: str,
                               args: TeamGroupingPreferenceArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamGroupingPreference(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               default: Optional[TeamGroupingPreferenceDefaultArgs] = None,
                               team_id: Optional[str] = None,
                               unlock_in_dashboard: Optional[bool] = None)
    func NewTeamGroupingPreference(ctx *Context, name string, args TeamGroupingPreferenceArgs, opts ...ResourceOption) (*TeamGroupingPreference, error)
    public TeamGroupingPreference(string name, TeamGroupingPreferenceArgs args, CustomResourceOptions? opts = null)
    public TeamGroupingPreference(String name, TeamGroupingPreferenceArgs args)
    public TeamGroupingPreference(String name, TeamGroupingPreferenceArgs args, CustomResourceOptions options)
    
    type: incident:TeamGroupingPreference
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "incident_team_grouping_preference" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TeamGroupingPreferenceArgs
    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 TeamGroupingPreferenceArgs
    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 TeamGroupingPreferenceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamGroupingPreferenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamGroupingPreferenceArgs
    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 teamGroupingPreferenceResource = new Incident.TeamGroupingPreference("teamGroupingPreferenceResource", new()
    {
        Default = new Incident.Inputs.TeamGroupingPreferenceDefaultArgs
        {
            Settings = new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsArgs
            {
                Enabled = false,
                AiEnabled = false,
                GroupingKeys = new[]
                {
                    new Incident.Inputs.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs
                    {
                        Reference = "string",
                    },
                },
                WindowSeconds = 0,
                WindowType = "string",
            },
        },
        TeamId = "string",
        UnlockInDashboard = false,
    });
    
    example, err := incident.NewTeamGroupingPreference(ctx, "teamGroupingPreferenceResource", &incident.TeamGroupingPreferenceArgs{
    	Default: &incident.TeamGroupingPreferenceDefaultArgs{
    		Settings: &incident.TeamGroupingPreferenceDefaultSettingsArgs{
    			Enabled:   pulumi.Bool(false),
    			AiEnabled: pulumi.Bool(false),
    			GroupingKeys: incident.TeamGroupingPreferenceDefaultSettingsGroupingKeyArray{
    				&incident.TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs{
    					Reference: pulumi.String("string"),
    				},
    			},
    			WindowSeconds: pulumi.Int(0),
    			WindowType:    pulumi.String("string"),
    		},
    	},
    	TeamId:            pulumi.String("string"),
    	UnlockInDashboard: pulumi.Bool(false),
    })
    
    resource "incident_team_grouping_preference" "teamGroupingPreferenceResource" {
      lifecycle {
        create_before_destroy = true
      }
      default = {
        settings = {
          enabled    = false
          ai_enabled = false
          grouping_keys = [{
            reference = "string"
          }]
          window_seconds = 0
          window_type    = "string"
        }
      }
      team_id             = "string"
      unlock_in_dashboard = false
    }
    
    var teamGroupingPreferenceResource = new TeamGroupingPreference("teamGroupingPreferenceResource", TeamGroupingPreferenceArgs.builder()
        .default_(TeamGroupingPreferenceDefaultArgs.builder()
            .settings(TeamGroupingPreferenceDefaultSettingsArgs.builder()
                .enabled(false)
                .aiEnabled(false)
                .groupingKeys(TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs.builder()
                    .reference("string")
                    .build())
                .windowSeconds(0)
                .windowType("string")
                .build())
            .build())
        .teamId("string")
        .unlockInDashboard(false)
        .build());
    
    team_grouping_preference_resource = incident.TeamGroupingPreference("teamGroupingPreferenceResource",
        default={
            "settings": {
                "enabled": False,
                "ai_enabled": False,
                "grouping_keys": [{
                    "reference": "string",
                }],
                "window_seconds": 0,
                "window_type": "string",
            },
        },
        team_id="string",
        unlock_in_dashboard=False)
    
    const teamGroupingPreferenceResource = new incident.TeamGroupingPreference("teamGroupingPreferenceResource", {
        "default": {
            settings: {
                enabled: false,
                aiEnabled: false,
                groupingKeys: [{
                    reference: "string",
                }],
                windowSeconds: 0,
                windowType: "string",
            },
        },
        teamId: "string",
        unlockInDashboard: false,
    });
    
    type: incident:TeamGroupingPreference
    properties:
        default:
            settings:
                aiEnabled: false
                enabled: false
                groupingKeys:
                    - reference: string
                windowSeconds: 0
                windowType: string
        teamId: string
        unlockInDashboard: false
    

    TeamGroupingPreference 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 TeamGroupingPreference resource accepts the following input properties:

    Default TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    TeamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    UnlockInDashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    Default TeamGroupingPreferenceDefaultArgs
    The grouping settings applied to this team's alerts on every alert route they match.
    TeamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    UnlockInDashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    default object
    The grouping settings applied to this team's alerts on every alert route they match.
    team_id string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlock_in_dashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    default_ TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId String
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard Boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    default TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    default TeamGroupingPreferenceDefaultArgs
    The grouping settings applied to this team's alerts on every alert route they match.
    team_id str
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlock_in_dashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    default Property Map
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId String
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard Boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TeamGroupingPreference resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The current version number, incremented on each update
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The current version number, incremented on each update
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The current version number, incremented on each update
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    The current version number, incremented on each update
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The current version number, incremented on each update
    id str
    The provider-assigned unique ID for this managed resource.
    version int
    The current version number, incremented on each update
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    The current version number, incremented on each update

    Look up Existing TeamGroupingPreference Resource

    Get an existing TeamGroupingPreference 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?: TeamGroupingPreferenceState, opts?: CustomResourceOptions): TeamGroupingPreference
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default: Optional[TeamGroupingPreferenceDefaultArgs] = None,
            team_id: Optional[str] = None,
            unlock_in_dashboard: Optional[bool] = None,
            version: Optional[int] = None) -> TeamGroupingPreference
    func GetTeamGroupingPreference(ctx *Context, name string, id IDInput, state *TeamGroupingPreferenceState, opts ...ResourceOption) (*TeamGroupingPreference, error)
    public static TeamGroupingPreference Get(string name, Input<string> id, TeamGroupingPreferenceState? state, CustomResourceOptions? opts = null)
    public static TeamGroupingPreference get(String name, Output<String> id, TeamGroupingPreferenceState state, CustomResourceOptions options)
    resources:  _:    type: incident:TeamGroupingPreference    get:      id: ${id}
    import {
      to = incident_team_grouping_preference.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.
    The following state arguments are supported:
    Default TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    TeamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    UnlockInDashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    Version int
    The current version number, incremented on each update
    Default TeamGroupingPreferenceDefaultArgs
    The grouping settings applied to this team's alerts on every alert route they match.
    TeamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    UnlockInDashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    Version int
    The current version number, incremented on each update
    default object
    The grouping settings applied to this team's alerts on every alert route they match.
    team_id string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlock_in_dashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    version number
    The current version number, incremented on each update
    default_ TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId String
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard Boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    version Integer
    The current version number, incremented on each update
    default TeamGroupingPreferenceDefault
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId string
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    version number
    The current version number, incremented on each update
    default TeamGroupingPreferenceDefaultArgs
    The grouping settings applied to this team's alerts on every alert route they match.
    team_id str
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlock_in_dashboard bool
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    version int
    The current version number, incremented on each update
    default Property Map
    The grouping settings applied to this team's alerts on every alert route they match.
    teamId String
    The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
    unlockInDashboard Boolean
    Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to false: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to true to leave the resource unclaimed — pair that with lifecycle { ignoreChanges = [...] } naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
    version Number
    The current version number, incremented on each update

    Supporting Types

    TeamGroupingPreferenceDefault, TeamGroupingPreferenceDefaultArgs

    Settings TeamGroupingPreferenceDefaultSettings
    How a team's alerts are grouped together, on every alert route
    Settings TeamGroupingPreferenceDefaultSettings
    How a team's alerts are grouped together, on every alert route
    settings object
    How a team's alerts are grouped together, on every alert route
    settings TeamGroupingPreferenceDefaultSettings
    How a team's alerts are grouped together, on every alert route
    settings TeamGroupingPreferenceDefaultSettings
    How a team's alerts are grouped together, on every alert route
    settings TeamGroupingPreferenceDefaultSettings
    How a team's alerts are grouped together, on every alert route
    settings Property Map
    How a team's alerts are grouped together, on every alert route

    TeamGroupingPreferenceDefaultSettings, TeamGroupingPreferenceDefaultSettingsArgs

    Enabled bool
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    AiEnabled bool
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    GroupingKeys List<TeamGroupingPreferenceDefaultSettingsGroupingKey>
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    WindowSeconds int
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    WindowType string
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    Enabled bool
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    AiEnabled bool
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    GroupingKeys []TeamGroupingPreferenceDefaultSettingsGroupingKey
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    WindowSeconds int
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    WindowType string
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    enabled bool
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    ai_enabled bool
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    grouping_keys list(object)
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    window_seconds number
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    window_type string
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    enabled Boolean
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    aiEnabled Boolean
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    groupingKeys List<TeamGroupingPreferenceDefaultSettingsGroupingKey>
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    windowSeconds Integer
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    windowType String
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    enabled boolean
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    aiEnabled boolean
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    groupingKeys TeamGroupingPreferenceDefaultSettingsGroupingKey[]
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    windowSeconds number
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    windowType string
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    enabled bool
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    ai_enabled bool
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    grouping_keys Sequence[TeamGroupingPreferenceDefaultSettingsGroupingKey]
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    window_seconds int
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    window_type str
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.
    enabled Boolean
    Whether the team's alerts are grouped. When false, none of the team's alerts are grouped, regardless of any alert route grouping config.
    aiEnabled Boolean
    Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must be empty or only contain the team alert attribute. Private alerts are not grouped unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
    groupingKeys List<Property Map>
    Which alert attributes the team's alerts are grouped by. Only set when grouping is enabled.
    windowSeconds Number
    How long the grouping window is, in seconds. Must be between 60 (1 minute) and 172800 (48 hours). Only set when grouping is enabled.
    windowType String
    How the grouping window behaves. 'rolling' keeps the window open for windowseconds after the most recent alert, so the group stays open as long as alerts keep arriving. 'fixed' opens the window when the first alert arrives and always closes windowseconds later. Only set when grouping is enabled. Possible values are: rolling, fixed.

    TeamGroupingPreferenceDefaultSettingsGroupingKey, TeamGroupingPreferenceDefaultSettingsGroupingKeyArgs

    Reference string
    A reference to a property of the alert to group on
    Reference string
    A reference to a property of the alert to group on
    reference string
    A reference to a property of the alert to group on
    reference String
    A reference to a property of the alert to group on
    reference string
    A reference to a property of the alert to group on
    reference str
    A reference to a property of the alert to group on
    reference String
    A reference to a property of the alert to group on

    Import

    Import is supported using an import block or the pulumi import command:

    The pulumi import command can be used, for example:

    !/bin/bash

    Import a team grouping preference using its ID. Replace the ID with a real ID from your incident.io organization: the Grouping tab of alert routing lists each team’s preference, and the public API’s list endpoint filters them by team_id.

    $ pulumi import incident:index/teamGroupingPreference:TeamGroupingPreference example 01ABC123DEF456GHI789JKL
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    incident incident-io/pulumi-incident
    License
    MIT
    Notes
    This Pulumi package is based on the incident Terraform Provider.
    incident logo incident.io
    Viewing docs for incident.io v0.4.1
    published on Wednesday, Oct 21, 2026 by incident-io

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial