Installation
Add the provider to your Terraform configuration and runterraform init:
Authentication
Authenticate with an OpenRouter Management API key, which starts withsk-or-mgmt-.... Management keys administer resources and cannot spend inference credits. Pass the key to the provider through api_key, for example with a Terraform variable or another secret-management workflow.
Example
This example creates a workspace, an API key assigned to that workspace, and a guardrail:What it manages
The provider supports the lifecycle of OpenRouter platform resources, including:- API keys and workspace configuration
- Guardrails and spending limits
- BYOK provider credentials
- Observability destinations
- SCIM group mappings
Resources and data sources
The provider currently includes six managed resources:openrouter_api_keyopenrouter_byok_keyopenrouter_guardrailopenrouter_observability_destinationopenrouter_scim_group_mappingopenrouter_workspace