> ## 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.

# Terraform provider

> Manage Sazabi projects, keys, log sources, dashboards, teams, and more as code with the Sazabi Terraform provider.

The Sazabi Terraform provider manages Sazabi resources — projects, keys, log sources, teams, integrations, and more — as code. This page covers installing and configuring the provider; each resource has its own reference page listing its arguments.

## Install and configure

Declare the provider in a `required_providers` block, then configure it:

```hcl title="main.tf" theme={"system"}
terraform {
  required_providers {
    sazabi = {
      source = "sazabi/sazabi"
    }
  }
}

provider "sazabi" {
  # Prefer environment variables for these; see Authentication below.
  # api_key         = var.sazabi_api_key
  # organization_id = var.sazabi_organization_id
}
```

Provider configuration:

| Argument | Required | Environment variable | Purpose |
| - | - | - | - |
| `api_key` | Yes | `SAZABI_API_KEY` | A Sazabi secret key. Sensitive. |
| `organization_id` | No | `SAZABI_ORGANIZATION_ID` | Default organization for org-scoped resources. |
| `base_url` | No | `SAZABI_API_BASE_URL` | Overrides the API base URL. |

## Authentication

The provider authenticates with a Sazabi **secret key**. Create one in the dashboard under [**Settings > Secret keys**](https://app.sazabi.com/settings/secret-keys) (or with `sazabi secret-keys create <name>`), then provide it through the `SAZABI_API_KEY` environment variable so it never lands in your configuration or state in plaintext:

```bash theme={"system"}
export SAZABI_API_KEY="sazabi_secret_your_secret_key"
export SAZABI_ORGANIZATION_ID="org_..."
```

Set `organization_id` (or `SAZABI_ORGANIZATION_ID`) so organization-scoped resources default to the right organization. Project-scoped resources default to the key's project scope when you omit `project_id`.

## Import

Every resource supports `terraform import`, so you can bring existing Sazabi resources under Terraform management. Import by the resource's ID:

```bash theme={"system"}
terraform import sazabi_project.example prj_...
```

A few resources use a composite import ID — for example `sazabi_team_membership` imports as `<team_id>/<user_id>` and `sazabi_notification_delivery_rule` as `<project_id>/<rule_id>`. Each resource page notes its import form.

## In this section

> [card] [sazabi\_project](https://docs.sazabi.com/reference/terraform/sazabi_project.md)
>
> A project.

> [card] [sazabi\_component](https://docs.sazabi.com/reference/terraform/sazabi_component.md)
>
> A tracked service, API, or feature.

> [card] [sazabi\_secret\_key](https://docs.sazabi.com/reference/terraform/sazabi_secret_key.md)
>
> A secret key for API access.

> [card] [sazabi\_log\_source](https://docs.sazabi.com/reference/terraform/sazabi_log_source.md)
>
> A log source.

> [card] [sazabi\_log\_stream](https://docs.sazabi.com/reference/terraform/sazabi_log_stream.md)
>
> A log stream under a native source.

> [card] [sazabi\_dashboard](https://docs.sazabi.com/reference/terraform/sazabi_dashboard.md)
>
> A saved project dashboard.

> [card] [sazabi\_team](https://docs.sazabi.com/reference/terraform/sazabi_team.md)
>
> An organization team.

> [card] [sazabi\_team\_membership](https://docs.sazabi.com/reference/terraform/sazabi_team_membership.md)
>
> A member's team membership.

> [card] [sazabi\_member](https://docs.sazabi.com/reference/terraform/sazabi_member.md)
>
> An organization member's role.

> [card] [sazabi\_member\_invitation](https://docs.sazabi.com/reference/terraform/sazabi_member_invitation.md)
>
> A pending member invitation.

> [card] [sazabi\_notification\_delivery\_rule](https://docs.sazabi.com/reference/terraform/sazabi_notification_delivery_rule.md)
>
> A project notification delivery rule.

> [card] [sazabi\_integration](https://docs.sazabi.com/reference/terraform/sazabi_integration.md)
>
> An API-key integration connection.

> [card] [sazabi\_integration\_jit\_policy](https://docs.sazabi.com/reference/terraform/sazabi_integration_jit_policy.md)
>
> Per-connection JIT policy.

> [card] [sazabi\_integration\_slack\_configuration](https://docs.sazabi.com/reference/terraform/sazabi_integration_slack_configuration.md)
>
> Connection-level Slack settings.

> [card] [sazabi\_integration\_slack\_channel\_project\_mapping](https://docs.sazabi.com/reference/terraform/sazabi_integration_slack_channel_project_mapping.md)
>
> A Slack channel-to-project mapping.

> [card] [sazabi\_integration\_microsoft\_teams\_configuration](https://docs.sazabi.com/reference/terraform/sazabi_integration_microsoft_teams_configuration.md)
>
> Connection-level Microsoft Teams settings.

> [card] [sazabi\_integration\_discord\_configuration](https://docs.sazabi.com/reference/terraform/sazabi_integration_discord_configuration.md)
>
> Connection-level Discord bot settings.

> [card] [sazabi\_integration\_discord\_channel\_project\_mapping](https://docs.sazabi.com/reference/terraform/sazabi_integration_discord_channel_project_mapping.md)
>
> A Discord bot channel-to-project mapping.

> [card] [sazabi\_organization\_jit\_policy](https://docs.sazabi.com/reference/terraform/sazabi_organization_jit_policy.md)
>
> Organization-wide JIT master switch.

> [card] [sazabi\_sso\_domain](https://docs.sazabi.com/reference/terraform/sazabi_sso_domain.md)
>
> An email domain claimed for single sign-on.

> [card] [sazabi\_sso\_domain\_verification](https://docs.sazabi.com/reference/terraform/sazabi_sso_domain_verification.md)
>
> Waits until a claimed SSO domain is verified.

> [card] [sazabi\_sso\_connection](https://docs.sazabi.com/reference/terraform/sazabi_sso_connection.md)
>
> The SAML 2.0 or OIDC single sign-on connection.

> [card] [sazabi\_sso\_scim](https://docs.sazabi.com/reference/terraform/sazabi_sso_scim.md)
>
> SCIM on the SSO connection, with its write-once token.

> [card] [sazabi\_sso\_service\_provider](https://docs.sazabi.com/reference/terraform/sazabi_sso_service_provider.md)
>
> Data source: service provider details for the identity provider.

> [card] [sazabi\_mcp\_connector](https://docs.sazabi.com/reference/terraform/sazabi_mcp_connector.md)
>
> A custom MCP connector.

> [card] [sazabi\_mcp\_connector\_read\_only](https://docs.sazabi.com/reference/terraform/sazabi_mcp_connector_read_only.md)
>
> Read-only mode on an existing connector.

> [card] [sazabi\_sandbox\_cli](https://docs.sazabi.com/reference/terraform/sazabi_sandbox_cli.md)
>
> A sandbox CLI connection.

> [card] [sazabi\_sandbox\_init\_script](https://docs.sazabi.com/reference/terraform/sazabi_sandbox_init_script.md)
>
> A custom sandbox initialization bash script.


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