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

Provide access to source variables for all plugins. #13225

Open
queglay opened this issue Dec 10, 2024 · 0 comments
Open

Provide access to source variables for all plugins. #13225

queglay opened this issue Dec 10, 2024 · 0 comments

Comments

@queglay
Copy link

queglay commented Dec 10, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

These docs suggest that you can access variables defined on sources later in build blocks.
https://developer.hashicorp.com/packer/docs/templates/hcl_templates/blocks/source

But from all the examples in this discussion thread it appears you cannot do this with the amazon-ebs plugin.
https://discuss.hashicorp.com/t/packer-source-blocks-unable-to-validate-in-packer-1-11-2/71853/9

We cannot for example reference ssh_username in an ansible plugin provisioner which means we repeat ourselves.

It is also not possible to define extra source variables unless the plugin uses them. This would be very helpful. Currently the documentation leads us to believe that these things are currently possible, but they are not.

Use Case(s)

To be able to reuse code without repe

Potential configuration

Potential References

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

No branches or pull requests

1 participant