<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>RudderStack Docs – How to Import Workspace Resources into Your Rudder CLI Project</title><link>https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/</link><description>Recent content in How to Import Workspace Resources into Your Rudder CLI Project on RudderStack Docs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/index.xml" rel="self" type="application/rss+xml"/><item><title>Archive: How to Manage Workspaces with Rudder CLI</title><link>https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/</guid><description>
&lt;p>This guide explains how to use import metadata and Rudder CLI to move between development and production workspaces and to streamline deployment.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="overview" data-heading="Overview" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/" data-title="How to Manage Workspaces with Rudder CLI" -->
&lt;h2 id="overview">Overview&lt;/h2>&lt;p>&lt;code>workspace_id&lt;/code> inside &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/#import-metadata" >import metadata&lt;/a> records where you imported from. When you later &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/#apply-imported-resources" >run &lt;code>apply&lt;/code>&lt;/a> against another workspace (for example production), Rudder CLI can create fresh resources there instead of binding to the original import.&lt;/p>
&lt;blockquote class="success">
&lt;div class="tip-quote">
&lt;img src=https://www.rudderstack.com/docs/docs/images/tick.svg loading="lazy" alt="success" decoding="async" class="img__small" style="
margin-top: 3px; width: 20px;height: 16px;" />
&lt;div class="tip-text">
You can build and test in a development workspace, then promote the same project to production. The same workflow covers Data Catalog, Tracking Plans, SQL Models, and Event Stream Sources.
&lt;/div>
&lt;/div>
&lt;/blockquote>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="streamline-import-and-production-deployment" data-heading="Streamline import and production deployment" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/" data-title="How to Manage Workspaces with Rudder CLI" -->
&lt;h2 id="streamline-import-and-production-deployment">Streamline import and production deployment&lt;/h2>&lt;p>For production environments, you can streamline the import and deployment process by integrating Rudder CLI with your CI/CD pipeline. This approach allows you to import resources once and then have your automated pipeline handle subsequent deployments.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="workflow" data-heading="Workflow" data-level="3" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/" data-title="How to Manage Workspaces with Rudder CLI" -->
&lt;h3 id="workflow">Workflow&lt;/h3>&lt;ol>
&lt;li>&lt;strong>Import&lt;/strong>: Run &lt;code>import workspace&lt;/code> and generate YAML from the workspace&lt;/li>
&lt;li>&lt;strong>Organize&lt;/strong>: Place files where your repository expects them&lt;/li>
&lt;li>&lt;strong>Commit&lt;/strong>: Push the YAML to version control&lt;/li>
&lt;li>&lt;strong>Deploy&lt;/strong>: Run &lt;code>rudder-cli apply&lt;/code> from the pipeline&lt;/li>
&lt;/ol>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="cicd-authentication-and-permissions" data-heading="CI/CD authentication and permissions" data-level="3" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/" data-title="How to Manage Workspaces with Rudder CLI" -->
&lt;h3 id="cicd-authentication-and-permissions">CI/CD authentication and permissions&lt;/h3>&lt;p>Configure your pipeline with a workspace-level Service Access Token with the same &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/#required-permissions" >resource permissions&lt;/a> you use for local import and &lt;code>apply&lt;/code>. Limit the token to the resource types the pipeline touches.&lt;/p>
&lt;p>For token types, legacy RBAC, and Personal Access Token caveats, see &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/#prerequisites" >Prerequisites&lt;/a> in the import guide.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="benefits" data-heading="Benefits" data-level="3" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/manage-workspaces/" data-title="How to Manage Workspaces with Rudder CLI" -->
&lt;h3 id="benefits">Benefits&lt;/h3>&lt;ul>
&lt;li>&lt;strong>Automated deployments&lt;/strong>: The pipeline applies approved YAML without manual CLI steps&lt;/li>
&lt;li>&lt;strong>Version control&lt;/strong>: Every change has a Git history&lt;/li>
&lt;li>&lt;strong>Consistent environments&lt;/strong>: The same definitions land in each stage you target&lt;/li>
&lt;li>&lt;strong>Rollback&lt;/strong>: You revert through Git when you need to undo a release&lt;/li>
&lt;/ul>
&lt;p>See &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/github-actions/" >GitHub Actions&lt;/a> for a full CI/CD example.&lt;/p></description></item><item><title>Archive: Troubleshoot Import and Apply Errors</title><link>https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/</guid><description>
&lt;p>This guide covers common validation and error scenarios when you import workspace resources into a CLI project or run &lt;code>apply&lt;/code> afterward.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="unsynced-changes-in-project" data-heading="Unsynced changes in project" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/" data-title="Troubleshoot Import and Apply Errors" -->
&lt;h2 id="unsynced-changes-in-project">Unsynced changes in project&lt;/h2>&lt;p>If your project has unsynced changes, running the &lt;code>import workspace&lt;/code> command will give you the following error:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Error: import not allowed as project has changes to be synced
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Fix&lt;/strong>: Run &lt;code>apply&lt;/code> to sync pending changes, then run &lt;code>import workspace&lt;/code> again.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="imported-directory-already-exists" data-heading="Imported directory already exists" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/" data-title="Troubleshoot Import and Apply Errors" -->
&lt;h2 id="imported-directory-already-exists">Imported directory already exists&lt;/h2>&lt;p>If an &lt;code>imported&lt;/code> directory already exists in your project, the &lt;code>import workspace&lt;/code> command will fail with the following error:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Error: directory for import: my-project/imported already exists
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Fix&lt;/strong>: Move anything you need out of &lt;code>imported/&lt;/code>, delete the &lt;code>imported&lt;/code> directory, and run &lt;code>import workspace&lt;/code> again.&lt;/p>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="import-fails-for-a-specific-resource" data-heading="Import fails for a specific resource" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/" data-title="Troubleshoot Import and Apply Errors" -->
&lt;h2 id="import-fails-for-a-specific-resource">Import fails for a specific resource&lt;/h2>&lt;p>When &lt;code>import workspace&lt;/code> or a resource-specific &lt;code>import&lt;/code> fails:&lt;/p>
&lt;ul>
&lt;li>Confirm the workspace still contains the &lt;code>remote_id&lt;/code> you&amp;rsquo;re importing&lt;/li>
&lt;li>Confirm your token includes the &lt;a href="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/#required-permissions" >required permissions&lt;/a> for that resource type&lt;/li>
&lt;li>Make sure the &lt;code>local_id&lt;/code> doesn&amp;rsquo;t conflict with an existing CLI-managed resource&lt;/li>
&lt;/ul>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="apply-fails-after-import" data-heading="Apply fails after import" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/" data-title="Troubleshoot Import and Apply Errors" -->
&lt;h2 id="apply-fails-after-import">Apply fails after import&lt;/h2>&lt;p>When &lt;code>apply&lt;/code> fails right after an import:&lt;/p>
&lt;ul>
&lt;li>Check that every generated YAML file is present and valid&lt;/li>
&lt;li>For SQL models you imported with &lt;code>--sql-location&lt;/code>, keep the YAML and the referenced &lt;code>.sql&lt;/code> file on the paths Rudder CLI expects&lt;/li>
&lt;li>Confirm you&amp;rsquo;re logged in and the token can reach the workspace&lt;/li>
&lt;li>Confirm that no manual changes were made to the resource in the RudderStack dashboard after import — if changes were
made outside Rudder CLI, you will be prompted to reconcile them&lt;/li>
&lt;/ul>
&lt;!-- end-chunk -->
&lt;!-- begin-chunk data-anchor="resource-deleted-from-dashboard-before-apply" data-heading="Resource deleted from dashboard before apply" data-level="2" data-permalink="https://www.rudderstack.com/docs/archive/rudder-cli/v0.1/import-resources/troubleshooting/" data-title="Troubleshoot Import and Apply Errors" -->
&lt;h2 id="resource-deleted-from-dashboard-before-apply">Resource deleted from dashboard before apply&lt;/h2>&lt;p>If you delete a resource from the RudderStack dashboard after running &lt;code>import workspace&lt;/code> but before running &lt;code>apply&lt;/code>, the &lt;code>apply&lt;/code> command will fail with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">Resource with ID not found
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Fix&lt;/strong>: Remove the matching YAML from the project (or rewrite it so Rudder CLI creates a new resource), then run &lt;code>apply&lt;/code> again.&lt;/p></description></item></channel></rss>