Convert Json to Hcl2

Hi,

I’m trying to use hcl2 langage to create an openstack image. But after few research on the web I haven’t been able to translate this part:

{
    "source_image_filter": {
        "filters": {
            "name": "ubuntu-16.04",
            "visibility": "protected",
            "owner": "d1a588cf4b0743344508dc145649372d1",
            "tags": ["prod", "ready"],
            "properties": {
                "os_distro": "ubuntu"
            }
        },
        "most_recent": true
    }
}

into a hcl2 code

Hi,

have you tried the packer hcl2_upgrade command yet?

1 Like

Filters are a kind of special case and it’s very possible it’ll require some work in the openstack plugin to make it work – can you open an issue over at GitHub - hashicorp/packer-plugin-openstack: Packer plugin for OpenStack Builder so we can track this and make sure it’s implemented?