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

Proposal: pre-processors #10594

Closed
dyferx opened this issue Feb 9, 2021 · 3 comments
Closed

Proposal: pre-processors #10594

dyferx opened this issue Feb 9, 2021 · 3 comments

Comments

@dyferx
Copy link

dyferx commented Feb 9, 2021

I'm using packer for azure VM image gallery templates creation.
There is a problem because we cannot create new image if "image definition" in gallery doesn't exist.

I have tried to use shell-local and az cli script to check if image definition is already defined and if not to create it but this doesnt work -> packer is checking if image definition exist in initial phase.

Adding pre-processor should resolve this issue.

@azr azr added enhancement stage/thinking Flagged for internal discussions about possible enhancements builder/azure and removed stage/thinking Flagged for internal discussions about possible enhancements labels Feb 9, 2021
@SwampDragons
Copy link
Contributor

This has been proposed in the past; probably the most relevant link is the conversation on this PR:

#7184

The tl;dr is that we've talked about this before and it feels like the wrong solution to the use cases it's been proposed for. For example, instead of using shell-local and the az-cli, you can write your shell check as a wrapping script that runs before Packer is launched at all. This check doesn't need the instance to be launched in order to run.

If it must be part of Packer, and I agree that it would be a more seamless user experience if we did that, it seems to me that your use case would better be solved with some kind of specific option within the Azure builder that creates the image definition if it doesn't exist, as part of normal Azure builder checks -- rather than an entire new framework for pre-processors.

@SwampDragons
Copy link
Contributor

It feels like this is probably a duplicate of #8803 -- can we close this and link it there, to track in the same place?

@ghost
Copy link

ghost commented Mar 13, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants