Terraform Enterprise: Automated Migration for Legacy Environments
We are pleased to announce an automated migration process in Terraform Enterprise to migrate Atlas legacy environments to the new workspaces. Based on the feedback we also extended the Atlas deprecation date from March 30th to May 31st. We hope this gives users an improved experience and more time to migrate.
In December 2017 we announced the General Availability release of Terraform Enterprise and the decommissioning of Atlas. Since then Terraform Enterprise legacy users have migrated legacy environments to new workspaces, but found the migration process laborious and error prone. The automated migrator will ease this process. We should have anticipated this pain and built the migrator early; we're sorry for the delay! We apologize for the inconvenience caused by the migration, but hope you find the new platform worth the upgrade.
» New automated migration process
The new automated migration process imports the data from a legacy environment to a newly created workspace.
The workspace creation page now includes an “Import from legacy (Atlas) environment” tab where a user can select a legacy environment to migrate data from. When the new workspace is created, data will be imported from the selected legacy environment to the new workspace.
The entire process is documented in detail in the upgrade guide.
» What does and does not get migrated
The new workspace will immediately migrate the most recent state, settings, and variables from the old environment. Once the most recent state, settings, and variables are migrated the new workspace will be unlocked so you can start using it. In the background, the tool will continue to migrate the state, configuration, and run history. The upgrade guide includes a comprehensive list of migrated data.
Data associated with deprecated features will not be migrated — personal environment variables, collaborators, and periodic queuing. The Differences Between Current and Legacy Terraform Enterprise document covers more details about the legacy features which have been moved, renamed, or deprecated.
» Using the API to migrate
In addition to using the UI to migrate a legacy environment to a workspace, you can also use the API. The “Create a workspace which is migrated from a legacy environment” documentation provides details of the API call and parameters. Below is an example of migrating the legacy my-org-legacy/my-env
environment to a new workspace my-org/my-workspace
. The tfe-cli tool also provides convenient wrappers to make the API calls.
» Sample payload.json
{
"data": {
"attributes": {
"name":"my-workspace",
"migration-environment":"my-org-legacy/my-env"
},
"type":"workspaces"
}
}
» CURL API call
$ curl \
--header "Authorization: Bearer $ATLAS_TOKEN" \
--header "Content-Type: application/vnd.api+json" \
--request POST \
--data @payload.json \
https://app.terraform.io/api/v2/organizations/my-org/workspaces
» Batch migration
Your organization may have more environments than can be easily migrated one-by-one via the new user interface. The Batch Migration guide shows how to use the workspace creation API via the HashiCorp supported tfe-cli tool to automate the migration.
» Conclusion
We hope the migration tool gives users an improved experience and postponing the deprecation from March 30th to May 31st provides more time to migrate. We appreciate your feedback in continuously improving Terraform Enterprise.
Sign up for the latest HashiCorp news
More blog posts like this one
New Terraform integrations with Crowdstrike, Datadog, JFrog, Red Hat, and more
12 new Terraform integrations from 9 partners provide more options to automate and secure cloud infrastructure management.
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.