> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sazabi_integration_discord_channel_project_mapping

> Terraform resource for a Discord bot channel-to-project mapping.

Routes conversations with the Sazabi Discord bot in one channel, and in threads under it, to a project, on an existing Discord bot integration connection. Other channels and direct messages keep the connection's default project, and existing conversations keep theirs. Each instance owns one mapping (keyed on connection and channel); use `for_each` for several. Deleting the resource removes the mapping.

## Example

```hcl theme={"system"}
resource "sazabi_integration_discord_channel_project_mapping" "alerts" {
  connection_id      = var.discord_bot_connection_id
  discord_channel_id = "1234567890123456789"
  project_id         = sazabi_project.payments.id
}
```

## Arguments

| Attribute | Type | Behavior | Description |
| - | - | - | - |
| `connection_id` | string | Required | The Discord bot integration connection. Immutable. |
| `discord_channel_id` | string | Required | The Discord channel ID (for example `1234567890123456789`). Must be a text or announcement channel the bot can see in the connection's server; a thread uses its channel's mapping. Immutable. |
| `project_id` | string | Required | Project the channel routes to. Must belong to the organization. |
| `organization_id` | string | Optional, Computed | Owning organization. Defaults to the provider's organization. Immutable. |
| `discord_channel_name` | string | Computed | Channel name, as Discord names it at each write. Informational. |
| `discord_guild_id` | string | Computed | The Discord server the channel belongs to. |

## Import

```bash theme={"system"}
terraform import sazabi_integration_discord_channel_project_mapping.alerts <connection_id>/<discord_channel_id>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.