Fivetran Connector Terraform Configuration
This document provides a step-by-step guide for setting up a custom Fivetran connector using Terraform to export conversations from Decagon to your data stack.
Requirements
- Terraform installed on your local machine
- Access to Fivetran (API key and API secret)
- Decagon API Key
- The URL of Decagon Google Cloud Function:
Terraform Configuration
Provider Configuration
First, set up the Fivetran provider in your Terraform configuration:
Variables
Define variables for sensitive information:
Fivetran Group Resource
Create a Fivetran group for the Decagon connector:
Fivetran Connector Resource
Configure the Fivetran connector for Decagon:
Usage
-
Save the Terraform configuration in a
.tf
file (e.g.,main.tf
). -
Initialize Terraform:
terraform init
-
Set up your variables in a
terraform.tfvars
file or use environment variables. -
Plan your Terraform changes:
terraform plan
-
Apply the Terraform configuration:
terraform apply
Verifying the Configuration
After applying the Terraform configuration, you can verify the setup by:
-
Checking the Fivetran portal to ensure the connector is created and properly configured.
-
Running an initial sync in Fivetran.
-
Verifying the exported conversations in your destination database:
SELECT * FROM decagon_conversations.conversation;
Note
Remember to handle your sensitive information (API keys, secrets, etc.) securely. Never commit these directly to version control. Consider using Terraform Cloud, AWS Secrets Manager, or similar services for managing sensitive variables in production environments.