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

hcl2_upgrade doesn't properly convert plan_info of azure builder #12409

Open
ayushtessell opened this issue May 6, 2023 · 1 comment
Open
Labels

Comments

@ayushtessell
Copy link

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

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

When converting packer azure builder from json to hcl format using hcl2_upgrade command the plan_info isn't properly converted to hcl format :

            "type": "azure-arm",
            "plan_info": {
                "plan_name": "centos-stream-8-0-free",
                "plan_product": "centos-stream-8-0-free",
                "plan_publisher": "eurolinuxspzoo1620639373013"
            },

into hcl is this

  plan_info = {
    plan_name      = "centos-stream-8-0-free"
    plan_product   = "centos-stream-8-0-free"
    plan_publisher = "eurolinuxspzoo1620639373013"
  }

but instead should be this

  plan_info  {
    plan_name      = "centos-stream-8-0-free"
    plan_product   = "centos-stream-8-0-free"
    plan_publisher = "eurolinuxspzoo1620639373013"
  }

I think previously people have experienced this issue as stated here

I highly urge to please to please find a robust method for hcl2_upgrade command as I think same type of problem occurred with shared_image_gallery tag for azure

Reproduction Steps

Steps to reproduce this issue

Packer version

Packer v1.8.5

Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format

instead of posting it directly in the issue.

Operating system and Environment details

OS, Architecture, and any other information you can provide about the
environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

@E0482204
Copy link

E0482204 commented Sep 1, 2023

I think I may be seeing the same thing: #12616

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

No branches or pull requests

2 participants