hcl2_upgrade doesn't properly convert `plan_info` of azure builder
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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](https://github.com/hashicorp/packer/issues/10462)
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](https://github.com/hashicorp/packer/issues/11942)
#### 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](https://gist.github.com/) of the log or use the [Github detailed
format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d)
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](https://gist.github.com/) of the log or
use the [Github detailed format](https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d) instead of posting it directly in the issue.
Set the env var `PACKER_LOG=1` for maximum log detail.
Contributor guide
Assessment
This issue has not been assessed yet.