terraform-provider-stackgen

sg_chat_channel (Resource)

⚠️ Experimental — Registers a Guild chat channel (Slack/Teams) in the org allowlist so subscriptions and auto-enroll rules can target it.

Example Usage

# When to use: Register a Slack/Teams channel in the org allowlist so
# subscriptions and auto-enroll rules can target it. Create this before
# sg_chat_subscription when you need an explicit channel UUID.
#
# Prerequisites: sg_guild_platform configured for slack/teams; real provider
# channel_id / workspace_id from the chat vendor (placeholders below).
#
# Related: sg_chat_channel_rule (auto-enroll by name glob), sg_chat_subscription
# (route mentions/messages to an agent or app).
resource "sg_chat_channel" "incidents" {
  chat_provider = "slack"
  channel_id    = "C0EXAMPLEINC" # Slack channel ID
  workspace_id  = "T0EXAMPLEORG" # Slack workspace / team ID
  channel_name  = "#incidents"
  visibility    = "private"
  enabled       = true
  thread_follow = "while_waiting"
  tags          = ["incidents", "sre"]
}

Import

Import an existing sg_chat_channel using its channel UUID:

terraform import sg_chat_channel.example '123e4567-e89b-12d3-a456-426614174000'

Schema

Required

Optional

Read-Only