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
![Which Terraform workflow should I use? VCS, CLI, or API?](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714171194-blog-library-product-terraform-black.jpg&w=3840&q=75)
Which Terraform workflow should I use? VCS, CLI, or API?
Learn about the three levels of HCP Terraform run workflows and key considerations to guide your decision on when to use each approach.
![Access Azure from HCP Terraform with OIDC federation](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1608227936-blog-library-product-azure.png&w=3840&q=75)
Access Azure from HCP Terraform with OIDC federation
Securely access Azure from HCP Terraform using OIDC federation, eliminating the need to use long-lived credentials for authentication.
![Enabling fast, safe migration to HCP Terraform with Terraform migrate (tf-migrate)](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714155806-blog-library-product-terraform-dark-gradient.jpg&w=3840&q=75)
Enabling fast, safe migration to HCP Terraform with Terraform migrate (tf-migrate)
There’s a faster, safer way to migrate your infrastructure state files from Terraform Community Edition to HCP Terraform and Terraform Enterprise.