> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Install and configure the Sigma Terraform provider

> Install the Sigma Terraform provider and configure authentication with API client credentials and your API base URL.

To manage your Sigma organization with Terraform, add the Sigma provider to your configuration and authenticate it with Sigma API client credentials. After you configure the provider, you can verify the connection. To write your first configuration, see [Use the Sigma Terraform provider](/docs/use-the-sigma-terraform-provider).

> **Note**
>
> Sigma Terraform Provider\
>
> Copyright 2026 Sigma Computing, Inc.
>
> Sigma Terraform Provider (the “application”) is licensed by Sigma Computing, Inc. (“Sigma”) under the [Apache License, Version 2.0](https://github.com/sigmacomputing/terraform-provider-sigma/blob/main/LICENSE) (the “License”).
>
> The application is not a part of Sigma’s services provided under Sigma’s Main Services Agreement and other similar commercial agreements between Sigma and its customers. The provision, access, installation, download, and use of the application are governed solely by the License; and you may not use the application except in compliance with the License. Unless required by applicable law or agreed to in writing, the application is distributed on an “as-is” basis, without warranties or conditions of any kind, either express or implied. Your use of the application is at your own risk, and Sigma has no obligation to support your use of this application.

## System and user requirements

Using the Sigma Terraform provider requires the following:

* [Terraform](https://developer.hashicorp.com/terraform/install) 1.0 or later. To import existing resources with [`import` blocks](https://developer.hashicorp.com/terraform/language/block/import), you need Terraform 1.5 or later.
* Internet access to download the provider and to reach your Sigma API base URL.
* To generate API client credentials, you must be assigned the **Admin** account type, or have the **Create API keys** permission assigned to your account type. For more information, see [Generate Sigma API client credentials](/reference/generate-client-credentials).

The provider is available for Linux, macOS, and Windows on the following CPU architectures: `amd64` and `arm64` on all three operating systems, and `386` on Linux and Windows only.

## Install the provider

The provider is published in the Terraform Registry as `sigmacomputing/sigma`. To install it, declare it in the `required_providers` block of your configuration, then initialize your working directory. For more information about this block, see [Provider requirements](https://developer.hashicorp.com/terraform/language/providers/requirements) in the Terraform documentation.

1. In your Terraform configuration, add the following block:

   ```hcl
   terraform {
     required_providers {
       sigma = {
         source  = "sigmacomputing/sigma"
         version = "~> 0.16"
       }
     }
   }
   ```

2. To download the provider, run the following [`terraform init`](https://developer.hashicorp.com/terraform/cli/commands/init) command:

   ```shell
   terraform init
   ```

### Install the provider in an air-gapped environment

If your environment can't reach the Terraform Registry, download a release archive from the [GitHub releases page](https://github.com/sigmacomputing/terraform-provider-sigma/releases) for the Sigma Terraform provider and follow the guidance in the [Terraform CLI configuration documentation](https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation).

## Configure authentication

The provider uses the OAuth2 client credentials flow. It needs a client ID and a client secret, and uses the API base URL for your Sigma organization:

#### Generate API client credentials

To create the client ID and secret, follow the steps in [Generate Sigma API client credentials](/reference/generate-client-credentials). Copy the client secret when Sigma displays it and store it securely.

#### Find your API base URL

The API base URL depends on the cloud and region of your Sigma organization. In Sigma, go to **Administration** > **Integrations** > **Developer Access** to find your **API base URL**, for example `https://aws-api.sigmacomputing.com`. For a list of base URLs, see [Get started with the Sigma REST API](/reference/get-started-sigma-api). If you don't set a base URL, the provider uses `https://api.sigmacomputing.com`.

## Add the provider configuration

After you have the client ID, client secret, and base URL, add the provider configuration.

You can set each value in the `provider` block, with an environment variable, or both. A value in the `provider` block takes precedence over an environment variable.

| Provider argument | Environment variable  | Required |
| ----------------- | --------------------- | -------- |
| `client_id`       | `SIGMA_CLIENT_ID`     | Yes      |
| `client_secret`   | `SIGMA_CLIENT_SECRET` | Yes      |
| `base_url`        | `SIGMA_BASE_URL`      | No       |

To configure the provider with input variables, add the following to your configuration, replacing the example base URL with the one for your organization:

```hcl
provider "sigma" {
  base_url      = "https://aws-api.sigmacomputing.com"
  client_id     = var.sigma_client_id
  client_secret = var.sigma_client_secret
}

variable "sigma_client_id" {
  type      = string
  sensitive = true
}

variable "sigma_client_secret" {
  type      = string
  sensitive = true
}
```

For more information about input variables, the `sensitive` argument, and `TF_VAR_` environment variables, see [Input variables](https://developer.hashicorp.com/terraform/language/values/variables) and [Protect sensitive input variables](https://developer.hashicorp.com/terraform/tutorials/configuration-language/sensitive-variables).

> **Warning**
>
> Don't commit your client secret to version control. Pass it with the `TF_VAR_sigma_client_secret` or `SIGMA_CLIENT_SECRET` environment variable, or read it from your secrets manager.

### Manage more than one organization

One `provider` block targets one Sigma organization. To manage more than one organization, or more than one region, define additional blocks with [provider aliases](https://developer.hashicorp.com/terraform/language/providers/configuration).

## Verify the configuration

To confirm that Terraform can authenticate with Sigma, read the identity of your credentials with the `sigma_whoami` [data source](https://developer.hashicorp.com/terraform/language/data-sources).

1. Add the following to your configuration:

   ```hcl
   data "sigma_whoami" "current" {}

   output "organization_id" {
     value = data.sigma_whoami.current.organization_id
   }
   ```

2. To check the connection, run the following [`terraform plan`](https://developer.hashicorp.com/terraform/cli/commands/plan) command:

   ```shell
   terraform plan
   ```

   If authentication succeeds, the plan output shows the `organization_id` of your Sigma organization.