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:- Navigate to API Keys
- Click Create API Key
- Name the key (e.g., “terraform-production”)
- Copy the key immediately
Examples
Full Production Stack
Resource Documentation
Full documentation for all resources: Core Objects:- formal_connector
- formal_resource
- formal_user
- formal_group
- formal_policy
- formal_space
- formal_satellite
Example Repositories
Formal provides complete Terraform examples: Clone and customize for your needs:Best Practices
Use Version Constraints
Use Version Constraints
Pin provider versions to avoid unexpected changes:
Store State Remotely
Store State Remotely
Use remote state backends (S3, Terraform Cloud) for team collaboration:
Use Variables
Use Variables
Parameterize configurations for reusability:
Separate Environments
Separate Environments
Use workspaces or separate state files for prod/staging/dev:
Enable Termination Protection
Enable Termination Protection
Protect production resources: