Skip to main content
Every resource the provider manages can be imported: a project, API key, model grant, budget, notifier, guardrail rule, routing rule, evaluator, or management key created in the dashboard can be adopted by Terraform without recreating it. This page covers importing a single resource, then generating a starting configuration for an entire workspace at once.

Import a single resource

Add an import block naming the resource address and the id to import, then run plan with -generate-config-out to write a starting configuration:
imports.tf
Both tools print a warning that configuration generation is experimental. The output is still directly usable: review generated.tf, move its content into the file it belongs in, delete the import block, and run apply.
Multiple import blocks in one file generate the whole batch in a single generated.tf. Every id form the resource’s own import documentation accepts (see each resource’s page on the Terraform Registry) works in an import block too.

Import an entire workspace

For a first adoption, generating one import block per existing resource by hand does not scale. The script below discovers every resource in a workspace through the same API the dashboard uses, and prints one import block per resource to stdout.
gen-imports.sh
Run it and generate configuration for the whole batch in one pass:
Importing only ever reads: it does not create, modify, or delete anything server-side. It is safe to run against a live, in-use workspace. Once generated.tf looks right, delete imports.tf (or the individual blocks that succeeded) so a later plan does not keep re-evaluating them.

Resources that need a manual pass

Config generation depends on the API returning enough information to reconstruct every attribute. A few attributes it cannot recover, verified against a live workspace:
orq_model.api_key, and orq_bedrock_model.assume_role_arn / assume_role_external_id, are never returned by the API after creation. The generated resource is missing them and fails to plan (Missing Configuration for Required Attribute) until they are added by hand, sourced from wherever the original credential is kept.
sharing is required but populated only from a server read, which -generate-config-out cannot turn into an attribute value for a required nested block. Import the resource on its own first, then copy its actual sharing configuration from terraform state show orq_workspace_model.<name> into the generated block.
orq_evaluator manages only llm_eval and python_eval evaluators; other types (function_eval, ragas, json_schema, http_eval, typescript_eval, bedrock_eval) are refused. orq_model manages only custom models created as openai-like; a custom model on another provider (Azure, Vertex, a LiteLLM import) has no matching resource yet. The script above skips these automatically.
The script skips a resource type outright rather than aborting the run if its listing endpoint errors, and reports it on stderr. Re-run it later, or import that type individually with a single import block.

Next steps

Supported resources

Every resource the provider manages, with links to the full reference.

Enterprise baseline

A pre-written locked-down setup to compare an imported workspace against.