Closed toast-gear closed 1 year ago
I am also facing the same issue. Can you please let me know what is the solution for this? I am not sure why it is closed without a solution.
It seems this repository has changed a bit since I used it and raised this issue (and appears to have been renamed). It was called hashicorp/packer-github-actions
at the time which appears to be legacy, hashicorp/packer-github-actions
worked as an abstraction to the packer binary. It now appears the repository instead is solely concerend with setting up the packer binary for you to then use the binary directly instead of via a nice declarative interface. As far as a solution, I believe I just did the tagging separately as an additional step with the AWS CLI so I didn't need a map to begin with.
If you take a look at the action manifest you can see the action is fundamentally different to when this issue was raised https://github.com/hashicorp/setup-packer/blob/main/action.yml. This issue is no longer relevant as the use case of this action has changed. I doubt they are planning long term to maintain the 2 branches, the master
branch can now be considered legacy and so bugs present won't be fixed.
Ok. Thank you for the quick response. However in my case, I want to merge some tags from SSM Parameter store of AWS along with some hardcoded tags while calling Packer Build from GitHub Actions. I have tried many things, but nothing seems to be working. It will be great, if you can post an example, if you know.
Either way it's a case of doing the tagging outside of the action with the aws cli. Going to close the issue as the repository now works fundamentally differently so this issue is no longer valid.
Expected Behavior
To be able to provide tags as variables in a packer build
Current Behavior
With a step like below the pipeline errors with a usage error i.e.
Usage: packer build [options] TEMPLATE
I've tried various variations e.g.:
I've also tried providing my arguments all on a single line and I get the same error.
If I remove the tag variable it works:
Steps to Reproduce