Skip to content

Commit 216835c

Browse files
authored
Merge pull request #13543 from hashicorp/update-migration-docs
Add post-migration auth info
2 parents 397e620 + 2d893b5 commit 216835c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ description: "Use Vagrant Cloud's migration tools to move all your artifacts to
66

77
# Migrate to HCP Vagrant Registry
88

9-
~> Note: Vagrant Cloud will be migrated to HCP Vagrant Registry at the end of July 2024.
10-
119
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.
1210

1311
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).

website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx

+13-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ The format of the composite access token is:
2626
<VAGRANT_CLOUD_TOKEN>;<HCP_TOKEN>
2727
```
2828

29-
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:
29+
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:
3030

3131
```
32-
;<HCP_TOKEN>
32+
<HCP_TOKEN>
3333
```
3434

3535
### HCP Access Token
@@ -65,12 +65,21 @@ The `hcp` command can also be used to provide the HCP access token to reduce the
6565
export VAGRANT_CLOUD_TOKEN="<VAGRANT_CLOUD_TOKEN>;$(hcp auth print-access-token)"
6666
```
6767

68-
If all organizations have been migrated to HCP Vagrant Registry, only the HCP access token will be needed:
68+
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:
6969

7070
```
71-
export VAGRANT_CLOUD_TOKEN=";$(hcp auth print-access-token)"
71+
export VAGRANT_CLOUD_TOKEN="$(hcp auth print-access-token)"
7272
```
7373

74+
Or, if using Vagrant v2.4.3 or later, by setting the `HCP_CLIENT_ID` and `HCP_CLIENT_SECRET` environment variables:
75+
76+
```
77+
export HCP_CLIENT_ID="<CLIENT_ID>"`
78+
export HCP_CLIENT_SECRET="<CLIENT_SECRET>"`
79+
```
80+
81+
If these variables are set, and the `VAGRANT_CLOUD_TOKEN` environment variable is unset, access tokens will be generated as needed when performing requests.
82+
7483
# Packer
7584

7685
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.

0 commit comments

Comments
 (0)