Skip to main content

Overview

The Formal Terraform Provider enables you to manage Connectors, Resources, Policies, Users, and all other Formal objects as infrastructure-as-code.

Installation

Add the provider to your Terraform configuration:

Authentication

Create an API key in the Formal console:
  1. Navigate to API Keys
  2. Click Create API Key
  3. Name the key (e.g., “terraform-production”)
  4. Copy the key immediately
Set the key as an environment variable or Terraform variable:
Or in Terraform:

Examples

Full Production Stack

Resource Documentation

Full documentation for all resources: Core Resources: Integrations: Data Sources:

Example Repositories

Formal provides complete Terraform examples: Clone and customize for your needs:

Best Practices

Pin provider versions to avoid unexpected changes:
Use remote state backends (S3, Terraform Cloud) for team collaboration:
Parameterize configurations for reusability:
Use workspaces or separate state files for prod/staging/dev:
Protect production resources:

Importing Existing Resources

Bring existing Formal objects under Terraform management:
Get object IDs from the Formal console or API.

Outputs

Export useful information:

Next Steps

Provider Docs

Complete Terraform provider documentation

Examples

Deployment examples on GitHub