---
title: "Getting Started"
description: "Manage Streamkap sources, destinations, pipelines, and transforms as infrastructure-as-code using the Streamkap Terraform provider and HCL configuration."
---

The Streamkap Terraform Provider lets you manage data integration infrastructure using Terraform's declarative configuration language. Define sources, destinations, pipelines, and transforms **as code** for version control, reproducibility, and automation.

import Callout from 'blume/components/content/Callout.astro';

:::note
The Streamkap Terraform Provider **v3 is the stable release line**. Pin `version = "3.0.0"` in your `required_providers` block; configurations that still pin a `3.0.0-beta.x` release should move to `3.0.0`.
:::

## What is Terraform?

[Terraform](https://www.terraform.io/) is an infrastructure-as-code (IaC) tool that allows you to define and provision infrastructure using a declarative configuration language. Instead of manually configuring resources through a UI, you write configuration files that describe your desired state, and Terraform handles creating, updating, and deleting resources to match.

## Why Use Terraform with Streamkap?

**Version Control**

Track changes to your data infrastructure in Git alongside your application code.

**Reproducibility**

Easily replicate your Streamkap setup across development, staging, and production environments.

**Automation**

Integrate with CI/CD pipelines for automated infrastructure deployment and updates.

**Documentation**

Your Terraform configuration serves as living documentation of your data infrastructure.

## Available Resources

The provider supports all Streamkap connector types — sources, destinations, transforms, pipelines, topics, and data sources. See the [Resource Reference](/terraform-resources) for the full list with registry links, or browse the [HashiCorp Registry](https://registry.terraform.io/providers/streamkap-com/streamkap/latest/docs) for complete attribute documentation and examples.

## Quick Example

```hcl
terraform {
  required_providers {
    streamkap = {
      source  = "streamkap-com/streamkap"
      version = "3.0.0"
    }
  }
}

provider "streamkap" {}

# Define a PostgreSQL source
resource "streamkap_source_postgresql" "orders_db" {
  name              = "orders-database"
  database_hostname = "db.example.com"
  database_port     = 5432
  database_dbname   = "orders"
  database_user     = var.db_username
  database_password = var.db_password
  database_sslmode  = "require"

  schema_include_list = "public"
  table_include_list  = "public.orders,public.customers"
  
  snapshot_read_only  = "No"
  signal_data_collection_schema_or_database    = "streamkap.streamkap_signal"
  heartbeat_enabled                            = true
  heartbeat_data_collection_schema_or_database = "streamkap"

  slot_name        = "streamkap_slot"
  publication_name = "streamkap_pub"
}

# Define a Snowflake destination
resource "streamkap_destination_snowflake" "warehouse" {
  name                    = "analytics-warehouse"
  snowflake_url_name      = var.snowflake_url
  snowflake_user_name     = var.snowflake_user
  snowflake_private_key   = var.snowflake_private_key
  snowflake_database_name = "ANALYTICS"
  snowflake_schema_name   = "PUBLIC"
  snowflake_role_name     = "STREAMKAP_ROLE"
  sfwarehouse             = "COMPUTE_WH"
}

# Create a pipeline connecting them
resource "streamkap_pipeline" "orders_to_snowflake" {
  name                = "orders-pipeline"
  snapshot_new_tables = true

  source = {
    id        = streamkap_source_postgresql.orders_db.id
    name      = streamkap_source_postgresql.orders_db.name
    connector = streamkap_source_postgresql.orders_db.connector
    topics    = ["public.orders", "public.customers"]
  }

  destination = {
    id        = streamkap_destination_snowflake.warehouse.id
    name      = streamkap_destination_snowflake.warehouse.name
    connector = streamkap_destination_snowflake.warehouse.connector
  }
}
```

## Next Steps

**[Install Terraform](/terraform-installation)**

Install Terraform CLI on macOS, Windows, or Linux

**[Configuration](/terraform-configuration)**

Set up credentials and create your first configuration

**[Resource Reference](/terraform-resources)**

Browse all available resources with examples

## Additional Resources

- [Streamkap Provider on HashiCorp Registry](https://registry.terraform.io/providers/streamkap-com/streamkap/latest/docs) - Full attribute documentation
- [Provider Source Code on GitHub](https://github.com/streamkap-com/terraform-provider-streamkap) - Report issues and contribute
- [Terraform Documentation](https://developer.hashicorp.com/terraform/docs) - Learn Terraform fundamentals
- [API Tokens](/api-tokens) - Create credentials for the provider
- [Agents](/agents) - Use Terraform with AI agents via [Terraform MCP servers](https://developer.hashicorp.com/terraform/mcp-server)
