From 2d893b53e889ee046c47baf63e13b327e88a1cdf Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 11 Nov 2024 16:24:24 -0800 Subject: [PATCH] Update migration docs Include information about HCP token generation. Remove the requirement of a semi-colon in the token for identifying the secondary token. --- .../hcp-vagrant/migration-guide.mdx | 2 -- .../hcp-vagrant/post-migration-guide.mdx | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx b/website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx index e9441af85e9..4cedc7bd351 100644 --- a/website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx +++ b/website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx @@ -6,8 +6,6 @@ description: "Use Vagrant Cloud's migration tools to move all your artifacts to # Migrate to HCP Vagrant Registry -~> Note: Vagrant Cloud will be migrated to HCP Vagrant Registry at the end of July 2024. - Your Vagrant Cloud Organization will be put into a read-only state and marked `Migrating` until the migration is complete. During this time boxes will be available in searches and to download, but write functionality like uploading new boxes, releasing versions, and managing settings for your Vagrant Cloud Organization will be unavailable. Your new HCP Registry will not be available until the migration is complete. When you migrate your default organization your Profile Settings (user name, gravatar url, etc) will no longer be available to manage in Vagrant Cloud and should be managed from your [HCP Settings](https://portal.cloud.hashicorp.com/account-settings). diff --git a/website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx b/website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx index fea1484880e..a9424c22396 100644 --- a/website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx +++ b/website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx @@ -26,10 +26,10 @@ The format of the composite access token is: ; ``` -If all organizations have been migrated to HCP Vagrant Registry the Vagrant Cloud access token will not be needed. The format of the access token is: +If all organizations have been migrated to HCP Vagrant Registry the Vagrant Cloud access token will not be needed. The format of the access token is simply the access token: ``` -; + ``` ### HCP Access Token @@ -65,12 +65,21 @@ The `hcp` command can also be used to provide the HCP access token to reduce the export VAGRANT_CLOUD_TOKEN=";$(hcp auth print-access-token)" ``` -If all organizations have been migrated to HCP Vagrant Registry, only the HCP access token will be needed: +If all organizations have been migrated to HCP Vagrant Registry, only authentication with HCP will be required. This can be done by providing the HCP access token in the `VAGRANT_CLOUD_TOKEN` environment variable: ``` -export VAGRANT_CLOUD_TOKEN=";$(hcp auth print-access-token)" +export VAGRANT_CLOUD_TOKEN="$(hcp auth print-access-token)" ``` +Or, if using Vagrant v2.4.3 or later, by setting the `HCP_CLIENT_ID` and `HCP_CLIENT_SECRET` environment variables: + +``` +export HCP_CLIENT_ID=""` +export HCP_CLIENT_SECRET=""` +``` + +If these variables are set, and the `VAGRANT_CLOUD_TOKEN` environment variable is unset, access tokens will be generated as needed when performing requests. + # Packer After migrating to HCP, box uploads may fail when using the [vagrant-cloud](/packer/integrations/hashicorp/vagrant/latest/components/post-processor/vagrant-cloud) post-processor. This is due to the HCP access token used in the composite token expiring prior to the post-processor being executed.