Skip to main content
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:
main.tf
Provider configuration:

Authentication

The provider authenticates with a Sazabi secret key. Create one in the dashboard under 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:
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:
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

sazabi_project

A project.

sazabi_component

A tracked service, API, or feature.

sazabi_secret_key

A secret key for API access.

sazabi_log_source

A log source.

sazabi_log_stream

A log stream under a native source.

sazabi_dashboard

A saved project dashboard.

sazabi_team

An organization team.

sazabi_team_membership

A member’s team membership.

sazabi_member

An organization member’s role.

sazabi_member_invitation

A pending member invitation.

sazabi_notification_delivery_rule

A project notification delivery rule.

sazabi_integration

An API-key integration connection.

sazabi_integration_jit_policy

Per-connection JIT policy.

sazabi_integration_slack_configuration

Connection-level Slack settings.

sazabi_integration_slack_channel_project_mapping

A Slack channel-to-project mapping.

sazabi_integration_microsoft_teams_configuration

Connection-level Microsoft Teams settings.

sazabi_integration_discord_configuration

Connection-level Discord bot settings.

sazabi_integration_discord_channel_project_mapping

A Discord bot channel-to-project mapping.

sazabi_organization_jit_policy

Organization-wide JIT master switch.

sazabi_sso_domain

An email domain claimed for single sign-on.

sazabi_sso_domain_verification

Waits until a claimed SSO domain is verified.

sazabi_sso_connection

The SAML 2.0 or OIDC single sign-on connection.

sazabi_sso_scim

SCIM on the SSO connection, with its write-once token.

sazabi_sso_service_provider

Data source: service provider details for the identity provider.

sazabi_mcp_connector

A custom MCP connector.

sazabi_mcp_connector_read_only

Read-only mode on an existing connector.

sazabi_sandbox_cli

A sandbox CLI connection.

sazabi_sandbox_init_script

A custom sandbox initialization bash script.