Skip to main content
Outcome: After this guide, you can manage Formal resources using Pulumi infrastructure-as-code.
Prerequisites: Pulumi CLI, Formal API key, programming language environment (TypeScript, Python, Go, or C#).

Overview

The Formal Pulumi Provider enables you to manage , , , Users, and all other Formal objects as infrastructure-as-code using your preferred programming language.

Installation

The Formal provider is available for multiple programming languages:

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., “pulumi-production”)
  4. Copy the key immediately
Set the key using Pulumi’s configuration system:
Verify:
Alternatively, set as an environment variable:

Examples

Full Production Stack

Resource Documentation

Full documentation for all resources: Core Objects: Integrations:

Example Repositories

Clone and customize for your needs:

Best Practices

Pin provider versions to avoid unexpected changes:TypeScript:
Python:
Use Pulumi Cloud or self-hosted backends for team collaboration:
Parameterize configurations for reusability:
Access in code:
Use separate stacks for prod/staging/dev:
Protect production resources:

Importing Existing Resources

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

Outputs

Export useful information:

Troubleshooting

Possible causes:
  • Invalid API key
  • API key not set correctly
Solution:
  1. Verify API key in Formal console
  2. Check configuration: pulumi config get formal:apiKey
  3. Ensure no whitespace in key
Possible causes:
  • Package not installed
  • Wrong package name
Solution:
  1. Install correct package for your language
  2. Verify import statements
  3. Check package.json/requirements.txt
Possible causes:
  • Invalid resource configuration
  • Missing required fields
Solution:
  1. Check API documentation
  2. Verify all required fields are set
  3. Check resource naming conventions

Next Steps

Provider Docs

Complete Pulumi provider documentation

Examples

Deployment examples on GitHub

Pulumi Cloud

Manage state and collaborate

Terraform Provider

Alternative IaC solution