Skip to main content
This guide walks you through configuring the Streamkap Terraform Provider and creating your first infrastructure-as-code configuration.

Prerequisites

Before you begin, ensure you have:
  • Terraform installed (version 1.0 or later)
  • A Streamkap account with access to a Project
  • API credentials (Client ID and Secret) from Streamkap

Step 1: Create API Credentials

1

Navigate to API Tokens

Log in to your Streamkap account and navigate to your project’s Project Settings.
2

Open API Tokens

Click on the API tab to access API Tokens.
3

Create a new token

Click Create API Token, enter a description (e.g., “Terraform automation”), select the appropriate role(s), and click Create Token.
4

Save credentials securely

Copy the Client ID and Token immediately. The token is only shown once.
Store your credentials securely. Never commit them to version control.

Step 2: Configure Credentials

Set your credentials as environment variables. This is the recommended approach for security.
To persist these across terminal sessions, add them to your ~/.bashrc, ~/.zshrc, or equivalent shell configuration file.

Step 3: Create Your Terraform Configuration

Create a new directory for your Terraform project and add the following main.tf file.
The beta version exposes significantly more resources — all source and destination connectors, transform resources, and more.
Pre-release versions require an exact version constraint — Terraform does not auto-select pre-release versions with >= or ~> operators.
The provider automatically reads credentials from the STREAMKAP_CLIENT_ID and STREAMKAP_SECRET environment variables. You can also set them directly in the provider block, but this is not recommended for security reasons.

Step 4: Initialize and Apply

Run the following commands in your project directory:

Provider Configuration Reference

The Streamkap provider supports the following configuration options:

Project Structure Recommendation

For larger projects, organize your Terraform files like this:
Here is an example .gitignore file you can use to exclude sensitive files:

Next Steps