⚠️ Experimental — Registers a Guild chat channel (Slack/Teams) in the org allowlist so subscriptions and auto-enroll rules can target it.
# 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 an existing sg_chat_channel using its channel UUID:
terraform import sg_chat_channel.example '123e4567-e89b-12d3-a456-426614174000'
channel_id (String) Provider-native channel identifier. Changing forces replacement.chat_provider (String) Chat provider. Must be slack or teams. Changing forces replacement.attach_channel_context (Boolean) Attach platform channel metadata to agent context (Slack topic description and pinned messages when available). Defaults to false; safe for Teams.channel_name (String) Human-readable channel name.enabled (Boolean) Whether the channel is enabled. Defaults to true when omitted.tags (List of String) Operator tags for subscription selectors. Empty list clears tags.thread_follow (String) Thread-follow mode. Must be off or while_waiting.visibility (String) Channel visibility. Must be public or private.workspace_id (String) Provider workspace or team identifier. Changing forces replacement.created_at (String) Creation timestamp (RFC 3339).id (String) Server-assigned chat channel UUID. Import with: terraform import sg_chat_channel.example ‘updated_at (String) Last modification timestamp (RFC 3339).