Skip to main content
This walkthrough creates one Fireweave project and two environments (stage, prod) with git ref rules.
You need Terraform >= 1.5 and an org-scoped API key (fw_org_…). Create the key before you apply — see Authentication.
1

Create a working directory

2

Declare the provider

The registry address is FireWeave-HQ/fireweave. Pin ~> 0.1.
main.tf
Leave api_key out of the file. Export FIREWEAVE_API_KEY instead.
The provider reads FIREWEAVE_API_KEY and FIREWEAVE_ENDPOINT. It does not read the SDK’s FW_API_URL or FW_PROJECT_API_KEY. See Authentication.
3

Define a project and environments

Append this to main.tf. Changing slug on either resource forces replacement.
4

Export your key and apply

terraform init downloads FireWeave-HQ/fireweave from the Terraform Registry. apply calls POST /v1/projects and POST /v1/projects/{projectID}/environments.

What you created

  • A project with slug demo-project.
  • A default stage environment that matches the main branch, tags prefixed stage-, and the webhook alias staging.
  • A prod environment that matches the release branch and tags matching v*.
Read the project id from state:
Or look the project up later with a data source — see Data sources.

Import an existing project

If the project already exists, import it instead of creating a second copy:

Next

Authentication

Org keys, FIREWEAVE_* vs FW_*, and custom endpoints.

Projects

name, slug, status, and import.

Environments

Ref-rule kinds and what Terraform does not expose.

Registry schema

Generated argument reference on the Terraform Registry.
Last modified on September 11, 2026