Skip to content

Commit

Permalink
Merge pull request #13543 from hashicorp/update-migration-docs
Browse files Browse the repository at this point in the history
Add post-migration auth info
  • Loading branch information
chrisroberts authored Nov 14, 2024
2 parents 397e620 + 2d893b5 commit 216835c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 0 additions & 2 deletions website/content/vagrant-cloud/hcp-vagrant/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
17 changes: 13 additions & 4 deletions website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ The format of the composite access token is:
<VAGRANT_CLOUD_TOKEN>;<HCP_TOKEN>
```

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_TOKEN>
<HCP_TOKEN>
```

### HCP Access Token
Expand Down Expand Up @@ -65,12 +65,21 @@ The `hcp` command can also be used to provide the HCP access token to reduce the
export VAGRANT_CLOUD_TOKEN="<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="<CLIENT_ID>"`
export HCP_CLIENT_SECRET="<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.
Expand Down

0 comments on commit 216835c

Please sign in to comment.