Skip to content

Latest commit

 

History

History
118 lines (88 loc) · 3.09 KB

File metadata and controls

118 lines (88 loc) · 3.09 KB
page_title flashduty_route Resource - flashduty
subcategory
description Manages routing configuration for a shared alert integration in Flashduty.

flashduty_route (Resource)

Manages routing configuration for a shared alert integration in Flashduty.

Example Usage

# Route configuration for a shared alert integration.
# Each integration has exactly one route (upsert semantics),
# so only define ONE flashduty_route resource per integration_id.
resource "flashduty_route" "main" {
  integration_id = 5592304204454

  cases = [
    {
      if = [
        {
          key  = "severity"
          oper = "IN"
          vals = ["Critical"]
        }
      ]
      channel_ids  = [6148622168454]
      routing_mode = "standard"
    },
    {
      if = [
        {
          key  = "labels.environment"
          oper = "IN"
          vals = ["production", "prod"]
        },
        {
          key  = "labels.team"
          oper = "IN"
          vals = ["sre", "platform"]
        }
      ]
      channel_ids  = [6148622168454]
      routing_mode = "standard"
    }
  ]

  default = {
    channel_ids = [6148622168454]
  }
}

Schema

Required

  • integration_id (Number) The ID of the shared alert integration.

Optional

Read-Only

  • created_at (Number) The timestamp when the route was created.
  • id (String) The unique identifier of the route (same as integration_id).
  • status (String) The status of the route.
  • updated_at (Number) The timestamp when the route was last updated.
  • version (Number) The version number of the route configuration.

Nested Schema for cases

Required:

Optional:

  • channel_ids (List of Number) Target channel IDs (required for standard routing mode).
  • fallthrough (Boolean) Whether to continue matching after this rule.
  • name_mapping_label (String) Label key for name mapping mode (e.g., labels.ChannelName).
  • routing_mode (String) Routing mode (standard, name_mapping).

Nested Schema for cases.if

Required:

  • key (String) The attribute or label key (e.g., title, severity, labels.xxx).
  • oper (String) The operator (IN, NOTIN).
  • vals (List of String) The values to match.

Nested Schema for default

Required:

  • channel_ids (List of Number) Default target channel IDs.

Nested Schema for sections

Required:

  • name (String) Section name (must be unique).
  • position (Number) Position (0 means before case 0).