Skip to content

rudderlabs/terraform-provider-rudderstack

Repository files navigation

RudderStack - Customer Data Platform for Developers

Customer Platform for Developers


Website · Documentation · Community Slack

RudderStack Terraform Provider

This repository implements the RudderStack Terraform provider. You can use this provider to programmatically access the RudderStack control plane via Terraform and seamlessly manage your source-destination configurations.

Questions? Join our Slack community for quick support.

Getting started

  • If you new to the Terraform platform, then their docs are a good place to start.
  • If you are interested in enhancing the RudderStack Terraform provider, create a local build and test your environment using an example configuration listed here.
  • To manage your production RudderStack resources via Terraform, get detailed documentation for the Terraform Provider here.

Setting up the development and build environment

Before you get started, make sure that following dependencies are installed:

  • Bash (On Windows, consider using WSL2 Ubuntu)
  • Go
  • Make

Building the Terraform provider

  1. Run the following command to build and install the provider:
$ make
$ make install
  1. Next, make sure that your /.terraformrc file has the following lines:
provider_installation {
  dev_overrides {
    "rudderlabs/rudderstack" = /users/abc/terraform.d/plugins/rudderstack.com/rudderlabs/rudderstack/0.2.12/linux_amd64/"
  }
}

The above snippet ensures that you use the locally built Terraform provider binary instead of the one available at the Terraform Registry.

A few things to note here:

  • Use the full path, that is, /users/xyz/.terraform.d/.... depending on your home directory.
  • The linux_amd64 part depends on your system's architecture. For example, on Macs it is darwin_amd64. This is essentially the path that is reported after the make install command runs.

Testing the sample configuration

  1. Navigate to the examples directory:
$ cd examples
  1. Run the following command to initialize the workspace and apply the sample configuration:
$ terraform init && terraform apply

Making a new release

Create a new tag with properly named version number

git tag vX.Y.Z
git push

Create new release

goreleaser release --rm-dist

Related

License

The RudderStack Terraform Provider is released under the MIT License.

Contribute

We would love to see you contribute to RudderStack. Get more information on how to contribute here.

Follow us