Migrating to Terrakube
When migrating to Terrakube you can use the following approaches:
Migrating with the Terraform CLI: Ideal for users who prefer to migrate workspaces individually, leveraging the familiar Terraform CLI.
Migrating with the Workspaces Importer: Provides a guided, wizard-like experience within Terrakube, enabling you to seamlessly import workspaces from platforms such as Terraform Cloud or Terraform Enterprise.
Migrating with the Terraform CLI
Begin by downloading the current state from Terraform Cloud / Enterprise with the following command:
Proceed to modify your Terraform configuration to introduce Terrakube as the replacement cloud backend. It's crucial to include the
hostname
parameter:
And run the following commands
Once the migration process is completed you should see the terraform state in your storage backend (azure, aws, gcp or minio) depending of your configuration
Migrating with the Workspaces Importer
To begin migrating your workspaces using the Workspace Importer within Terrakube, follow these steps:
Navigate to the Workspaces List within your organization and click on "Import Workspaces".
Select Your Platform: Choose the platform where your workspaces are currently hosted. Terrakube currently supports both Terraform Cloud and Terraform Enterprise.
Choose Your Workflow: Decide on the workflow type you wish to use for the import. If you need to import from multiple workflows, you will need to execute the importer for each one separately.
Configure VCS Workflow (If Applicable): For a Version control workflow, select your VCS provider connection. For guidance on connecting your VCS provider, refer to the VCS provider section.
Enter API Keys: Provide your Terraform Cloud or Terraform Enterprise API keys. For Terraform Enterprise, you will also need to supply your host URL. For more information, consult the Terraform Cloud documentation.
Select Workspaces for Import: A list of available workspaces will be displayed. Select the ones you wish to import and then click the "Import Workspaces" button.
Import Process: The importer will replicate workspace details such as name, description, Terraform version, execution mode, variables, tags and the current state into Terrakube.
Once the import process is finished, you can view the imported workspaces in Terrakube.