Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add post-migration auth info #13543

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading