You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using vagrant-cloud post-processor to upload a freshly generated box into vagrant cloud, we are getting an exception if the version already exists.
==> vagrant: Running post-processor: vagrant-cloud
==> vagrant (vagrant-cloud): Verifying box is accessible: hlesey/k8s-base
vagrant (vagrant-cloud): Box accessible and matches tag
==> vagrant (vagrant-cloud): Creating version: 1.18.2.2
vagrant (vagrant-cloud): Version exists, skipping creation
==> vagrant (vagrant-cloud): Creating provider: virtualbox
==> vagrant (vagrant-cloud): Cleaning up provider
vagrant (vagrant-cloud): Provider was not created, not deleting
Build 'vagrant' errored: 1 error(s) occurred:
* Post-processor failed: Error creating provider: Metadata provider must be unique for version
One way to mitigate it is to manually remove the provider for this version from vagrantcloud UI and retry the packer build.
Another way to avoid such exceptions is to increase the version when uploading the new box. In this case we have to announce everyone that consumes this box that a new version is available and they have to adjust their config.
It would be nice to have a new parameter for vagrant-cloud post-processor, something like replace_if_exists defaulting to false.
This issue was originally opened by @adriananeci as hashicorp/packer#9492. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Feature Description
When using vagrant-cloud post-processor to upload a freshly generated box into vagrant cloud, we are getting an exception if the version already exists.
With debug enabled I've got
One way to mitigate it is to manually remove the provider for this version from vagrantcloud UI and retry the
packer build
.Another way to avoid such exceptions is to increase the version when uploading the new box. In this case we have to announce everyone that consumes this box that a new version is available and they have to adjust their config.
It would be nice to have a new parameter for vagrant-cloud post-processor, something like
replace_if_exists
defaulting to false.Sample config
vagrant cli already support replacing existing version,
vagrant cloud provider upload ORGANIZATION/BOX-NAME PROVIDER-NAME VERSION BOX-FILE
Use Case(s)
As a packer user, I want to be able to replace an existing box version when using vagrant-cloud post-processor.
The text was updated successfully, but these errors were encountered: