How to Import Workspace Resources into Your Rudder CLI Project
Alpha
Import existing RudderStack workspace resources into your CLI project to start managing them programmatically through Git workflows.
Available Plans
free
starter
growth
enterprise
5 minute read
This guide walks you through importing workspace resources into a Rudder CLI project and running apply so the CLI manages them.
Overview
Rudder CLI manages Data Catalog, Tracking Plans, SQL Models, and Event Stream Sources as YAML.
If those resources already exist in your workspace, you can use the import workspace command to generate files under imported/, adjust them if needed, then run apply to attach them to your CLI project — you do not need to recreate everything manually.
Tip:
Include permissions only for the resource types you use. The same scope applies for apply locally or in CI/CD. See Manage Workspaces for a deployment-oriented workflow.
Resource type
Resource
Permissions
Data Catalog and Tracking Plans
Data Catalog
Edit
Tracking Plans
Edit
SQL Models
SQL Models
Create & Delete, Edit
Event Stream Sources
Event Stream Sources
Create & Delete, Edit, Connect
Tracking Plans
Edit, Connect
For testing or development only: Use a Personal Access Token with the Read-Write role.
RudderStack recommends using a workspace-level Service Access Token for authentication.
Any action authenticated by a Personal Access Token will break if the user is removed from the organization or a breaking change is made to their permissions.
You have a Rudder CLI project directory (can be empty)
You have no unsynced changes in your project — apply any existing changes first by running the apply command.
You don’t have an existing directory named imported in your CLI project.
Otherwise, the import process will fail.
To import all resources from your current workspace into a CLI project, run the import workspace command — replace <project-directory> with the path to your CLI project directory.
The command scans your workspace for resources not yet managed by Rudder CLI, writes YAML under imported/, and adds import metadata that maps local IDs to workspace IDs.
One YAML per model — SQL inline by default, or under sql/ when using external files
Folder names under imported/ follow the layout your Rudder CLI version generates. If you upgrade the CLI and the structure changes, compare the new output with this table and move files as needed before you run apply.
Import metadata
YAML from an import includes metadata.import so Rudder CLI can match local definitions to workspace resources.
For how workspace_id behaves when you target another workspace, see Manage Workspaces.
The import workspace command only writes files; it does not register them with your CLI project.
Review and adjust files
Confirm the generated YAML matches what you expect. You may move files out of imported/ to match your layout and edit fields such as names or descriptions. Before you run apply, read Key considerations for rules on local_id, remote_id, import metadata, and dashboard changes.
Apply imported resources
Run:
rudder-cli apply -l <project-directory>
apply finds resources marked for import, links them to the CLI project, prints a summary, and asks you to confirm.
Example:
$ rudder-cli apply -l ./my-rudder-project
Importable resources:
- category:abc
- category:webapp
? Do you want to apply these changes? (y/N)
After you confirm, you manage those resources through Rudder CLI.
Important considerations
This section covers important considerations when importing workspace resources and applying them to your CLI project.
Use Rudder CLI as the source of truth
For CLI-managed resources, use only Rudder CLI (not the dashboard or APIs) unless you intend to reconcile outside changes. After a successful apply, Rudder CLI is the source of truth for those resources.
IDs, metadata, and the dashboard
Do not change remote_id values in imported YAML — updates will fail.
You may change local_id only beforeapply. Keep the import metadata mapping in sync with any local_id you change.
After apply, do not change local_id.
Do not delete a resource in the dashboard after import but before apply — otherwise apply will fail with Resource with ID not found. See Resource Deleted from Dashboard Before Apply.
Workflow tips
Try the flow in a development workspace before production.
Commit imported YAML to version control so changes stay reviewable and reversible.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.