Skip to main content
The Interfere Terraform provider manages existing workspace settings, apps, and private API keys. The provider and API call an app a surface, so resources, attributes, and scopes use that name.

Configure the provider

Add the provider to your Terraform configuration:
Follow Create a workspace key to sign in with the CLI and create your first Terraform credential. Configure your shell or CI secret manager to supply the returned secret as INTERFERE_TOKEN. App management requires these scopes:
  • org:surfaces:read
  • org:surfaces:write
  • org:surfaces:delete
Use a workspace API key for unattended runs. A release-only app key cannot manage workspace resources.

Manage workspace settings

Use interfere_workspace to manage an existing workspace’s name and slug:
This resource adopts an existing workspace. It does not create one. Removing the resource from Terraform only removes it from state; it does not delete the workspace. Grant the provider credential org:workspace_basics:read and org:workspace_basics:write for this resource.

Create an app

Supply values in terraform.tfvars:
terraform.tfvars
Replace acme with your workspace slug and generate a nonzero UUID for this app. Keep that UUID stable across plans and retries; do not use uuid() to generate a different value on every run.
The resource returns id and slug. App creation also issues default credentials. Manage SDK and build credentials on the app in Interfere. They are not stored in Terraform state.

Update or replace an app

Review a replacement plan before applying it. Deleting a resource from configuration causes Terraform to request deletion of the managed app. Supported framework values are elysia, nest, nextjs, python, and react.

Import an existing app

Add a matching resource block, then import with the workspace and app slugs:
The creation UUID cannot be recovered during import. Supply a new UUID in your configuration. The next apply records it without recreating the imported app.

Manage private API keys

Use interfere_private_key for a workspace automation key or an app build key. Set surface_slug to scope a key to an app; omit it for a workspace key.
For workspace keys, the provider credential needs org:workspace_auth:read and org:workspace_auth:write. For app keys, it needs org:surfaces:read and org:surfaces:write. The credential must also be allowed to grant the requested scopes. The example expires after 30 days. Omit seconds_until_expiration or set it to null for no expiry. Changing grants or lifetime replaces the key, so choose a fresh creation UUID for the replacement. The resource’s secret output is sensitive and is stored in Terraform state. Use a state backend with access controls appropriate for credentials. Import restores metadata only; it cannot recover the secret.

Recover from an uncertain request

The provider does not automatically retry API requests. After an uncertain create response, keep the original creation UUID and configuration when retrying. If Interfere explicitly reports that an app is deleted, the provider removes it from state. An empty response or an HTTP error preserves state and reports an error, because missing permissions can also prevent a read. Check credentials and workspace access before changing state manually.