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

[Feature Request] Add support for usage of required_plugins #58

Closed
Lirt opened this issue Dec 9, 2021 · 5 comments
Closed

[Feature Request] Add support for usage of required_plugins #58

Lirt opened this issue Dec 9, 2021 · 5 comments

Comments

@Lirt
Copy link

Lirt commented Dec 9, 2021

In new packer versions it is possible to define required plugin in packer configuration file. This eliminates need to download the plugin locally and execute manual steps to download, chmod, etc. So this simplify whole process very much and allows users to keep exact dependency version directly in repositories.

When I try to use it I use following config:

packer {
  required_version = ">= 1.7.0, < 1.8"
  required_plugins {
    goss = {
      version = "= 3.1.2"
      source  = "github.com/YaleUniversity/packer-provisioner-goss"
    }
  }
}

But it fails with this error:

$ packer init --upgrade default.pkr.hcl
Error: Invalid plugin type

  on default.pkr.hcl line 43, in packer:
  43:     goss = {
  44:       version = "= 3.0.0"
  45:       source  = "github.com/YaleUniversity/packer-provisioner-goss"
  46:     }

Plugin source "github.com/yaleuniversity/packer-provisioner-goss" has a type
with the prefix "packer-", which isn't allowed because it would be redundant to
name a Packer plugin with that prefix. If you are the author of this plugin,
rename it to not include the prefix.

It looks like the repository has to be renamed in order to allow this feature to work -- source: https://www.packer.io/docs/plugins#source-addresses.

Would it be possible to rename this repository to provide this? I think when renaming github repository, also the old name is preserved and redirected to new repository so this change is not that backwards incompatible.

Here is working example by using my fork https://github.com/Lirt/packer-plugin-goss/releases/tag/v3.1.2:

packer {
    required_version = ">= 1.7.0, < 1.8"
    required_plugins {
        goss = {
        version = "= 3.1.2"
        source  = "github.com/lirt/goss"
        }
    }
}
  • Repository needs to be renamed.
  • Release artifacts must have proper naming, be zipped and have SHA256SUMS file.
@Lirt
Copy link
Author

Lirt commented Dec 10, 2021

Any chance to check this @fishnix ?

@Lirt
Copy link
Author

Lirt commented Dec 10, 2021

Prerequisite is #59

@ahmedwonolo
Copy link

this would be very useful!

@mkarroqe
Copy link

Renaming the repo would be very useful, can this change please be made?

@FalcoSuessgott
Copy link
Collaborator

This has been solved by #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants