Infrastructure-as-Code for dbt Cloud: Instance Migration Made Easy

This hands-on guide walks you through the end-to-end process of migrating a complete dbt Cloud configuration from one hosting region (US in this case) to another (EMEA). Using the open-source dbtcloud-terraforming tool alongside the official dbt Labs Terraform provider, you can export your existing setup in dbt Cloud as Terraform code and apply it to your new account in an automated and controlled way, reducing manual effort and minimizing errors. 

 

Explore Our dbt Services 

 

Why Migrate Your dbt Cloud Instance? 

Organizations migrate dbt Cloud instances for a variety of reasons: to satisfy data residency requirements (e.g., GDPR), enhance performance for distributed teams, or consolidate billing across accounts. Manually re-creating dozens of resources (projects, environments, jobs, schedules, users, and permissions) in the target account is time-consuming and error-prone. Let’s take a closer look. 

 

Data Residency and Compliance 

dbt Labs offers enterprise customers regional hosting; the new European instance hosted in Frankfurt provides 100 % in‑region data residency and meets certifications such as ISO 27001, ISO 27701 and GDPR. If your company must keep data within a specific geography, migrating to the appropriate region helps satisfy these requirements. 

 

Performance and User Experience 

Locating your dbt account closer to your team reduces network latency. For distributed teams with analysts in EMEA or APAC, moving from the US region to a local instance can improve build times and the responsiveness of the development UI. 

 

Account Consolidation and Billing 

Sometimes multiple dbt accounts need to be consolidated under a single billing arrangement or into a different tenancy (for example, from multi‑tenant to cell‑based). Migrating to a new region ensures that all projects share the same regional settings and compliance posture. 

 

That said, below I will demonstrate how to: 

 

  1. Extract your existing dbt Cloud configuration as Terraform code. 
  2. Configure Terraform for the target region. 
  3. Apply the exported resources to your new account. 
  4. Validate and troubleshoot the migrated setup. 

With Infrastructure-as-Code, your dbt Cloud configuration becomes portable, auditable, and repeatable. 

 

You May Also Like: dbt Cloud Pricing 2025: What You’ll Actually Pay 

Prerequisites for a Successful dbt Cloud Migration 

Before you begin, ensure you have: 

 

  • Terraform (v1.x) installed and available in your $PATH.
  • Python 3.8+ and pip. 
  • dbtcloud-terraforming installed 
  • Two dbt Cloud API tokens (Admin scope) – one for the source account and one for the target. Please note they need to be service tokens (not Personal) 
  • Account IDs for both accounts 
  • An empty folder structure for Terraform 

Overview of dbtcloud-terraforming 

The dbtcloud-terraforming can be used to load existing dbt Cloud configuration into Terraform. It connects to your dbt Cloud account via API, retrieves all resources, and generates Terraform configuration files (*.tf) along with a state file. It covers most of the resources one would need like projects, environments, jobs and users. For a complete list you can refer to the GitHub page of the tool. 

 

Limitations: 

  • Does not export encrypted secrets or API keys; these must be added manually. 
  • Resource dependencies may require manual review. 

dbt Cloud Migration Step 1: Extracting Your Source Configuration 

Run dbtcloud-terraforming interactive which will prompt you to input your account ID, API token (with Account Admin scope) and the host URL. You can find the appropriate URL using the guide here. 

You will be presented with a list of available projects which you can include for export. 

The next step will ask you if you want to generate the resource configuration, import blocks or both. Select both (genimport). 

On the next screen you will be able to select the resource types you would like to export. For a complete lift and shift migration, select all resources. 

Next, you will be able to select any resource types you would like to exclude. In our case we do not select anything because we want to migrate everything. 

Next we need to select which resources we would like to link together. Select All resources. 

Since we are doing a complete migration we can skip parametrizing the jobs. 

On the next screen we confirm we want modern import blocks (making sure we are running a compatible Terraform version). 

Lastly, we provide the path to where we want our configuration to be exported. 

At this point you should have a Terraform file (main.tf) containing the configuration for your “old” instance. If you would like to simply replicate it to the new region, you will use it as is. However, if any changes are necessary (e.g. renaming resources, changing job schedules, etc.) they can be done directly in the file. 

 

Keep Reading: dbt Semantic Layer at Scale: How to Build a Single Source of Truth for Enterprise Metrics 

dbt Cloud Migration Step 2: Preparing Your Target Environment 

In our example, we are doing a full migration between two regions, so we want our target dbt Cloud tenant to be completely empty. 

 

Make sure that you have configured the dbtcloud provider in your versions.tf file as follows: 

dbt Cloud Migration Step 3: Importing & Applying to the Target Account 

  1. Initialize Terraform with terraform init 
  2. Plan by running terraform plan. At this point Terraform will tell you how many resources will be created. Optionally you can output the plan to a file 
  3. Lastly, run terraform apply plan.tf to confirm and apply the changes.  

dbt Cloud Migration Step 4: Validation 

  1. After you have successfully applied the configuration, navigate to your dbt Cloud instance and validate all resources have been created. 
  2. Enter/Update any encrypted secrets that were not migrated 
  3. Trigger a job run to validate the configuration and (hopefully) congratulate yourself for a job well done. 

Explore More: Mastering dbt: Best Practices for Efficient Data Workflows 

dbt Cloud Migration: Additional Considerations & Limitations 

Regional Constraints 

Each dbt Cloud account must be hosted in a single region. Multi‑region operations require multiple accounts. At the time of writing, dbt Labs does not offer automated migrations between regions. 

 

Feature Parity 

Almost all features available in the US instance are also available in the European instance, though new features may roll out gradually. 

 

Incomplete Exports  

The tool does not export encrypted secrets, API keys or all credential types. Some resource relationships (such as environment variables with job overrides) may require manual review. 

 

IaC Complexity 

Introducing Terraform requires infrastructure knowledge and may not suit every team. The benefits, such as version control, collaboration and scalability should outweigh the extra tooling overhead. 

dbt Cloud Migration FAQs 

What is dbt Cloud migration and why might I need it? Toggle title

dbt Cloud migration refers to moving your dbt Cloud account and its projects, environments, and jobs to a different hosting region. Many teams undertake a migration to meet data residency requirements, improve performance for distributed users, or consolidate accounts and billing. 

How do I migrate a dbt Cloud instance between regions? Toggle title

You can migrate a dbt Cloud instance by exporting your current configuration with the dbtcloud-terraforming tool, configuring the dbt Cloud Terraform provider for the target region, and applying the exported code. This Infrastructure-as-Code approach avoids manual recreation and ensures repeatability. 

Does dbt Cloud support automated regional migrations?

Currently, dbt Labs does not offer an automated migration service for moving accounts between regions. Each dbt Cloud account is tied to a single region, so you must create a new account in the target region and use tools like Terraform to recreate your resources. 

What are the prerequisites for a successful dbt Cloud migration?

You’ll need Terraform v1.x, Python 3.8 or higher, the dbtcloud-terraforming CLI, service tokens for both the source and target accounts, and the account IDs. It’s also very important that the destination account be empty before applying the Terraform configuration. 

What limitations should I be aware of when migrating with Terraform?

While Terraform covers most dbt Cloud resources, it cannot export encrypted secrets or API keys; you’ll need to re-enter those manually. Feature parity between regions is generally good, but some new features may roll out more slowly to certain regions. 

dbt Cloud Migraion: Next Steps with B EYE 

Using dbtcloud‑terraforming and the dbt Cloud Terraform provider allows you to migrate an entire dbt Cloud instance between regions while maintaining version control and repeatability. By exporting your existing configuration as Terraform code, applying it to a fresh account, and validating the result, you gain: 

 

  • Portability: Easily spin up regional accounts. 
  • Auditability: Track configuration changes in version control. 
  • Repeatability: Consistent environment creation across regions. 

With this approach, future migrations or custom setups—are just a matter of tweaking provider settings and re-deploying your Terraform code. 

Have dbt Cloud migration questions? 

B EYE offers expert dbt consulting and managed dbt services. Our experts can plan and execute your cross‑region migration, set up Terraform workflows and ensure compliance with regional regulations. Call us at +1 888 564 1235 (US) or +359 2 493 0393 (Europe), or fill out our form to discuss how we can support your project goals with dbt. 

Author
Mihail Tsenev

Related Articles

Discover the
B EYE Standard