How to configure HCP packer registry when there are multiple sources being built

Hey there,

Looking for advice on how we can configure multiple packer registry buckets (images) in a single packer build. Our current setup is as follows:

we build 2 types of image (a ubuntu base image, and a ubuntu image with docker and a few other bits installed), and each of these images has a vmware and amazon AMI variation.

I would like to push these all to HCL using the hcl_packer_registry plugin. However, if i do the following:

build {
  sources = [
    "amazon-ebs.ubuntu-base",
    "vsphere-iso.ubuntu-base",
    "amazon-ebs.ubuntu-docker",
    "vsphere-iso.ubuntu-docker"
  ]

  hcp_packer_registry {
    bucket_name = "vm-images"
    description = "vm images"

    bucket_labels = {
      "product" = "vm image builder"
    }
  }
}

then when i go into HCL i cannot uniquely reference one of the images (it thinks they are all variations of the same image). However, when i try to split the build block into 2, and then provide different variations:

build {
  sources = [
    "amazon-ebs.ubuntu-docker",
    "vsphere-iso.ubuntu-docker"
  ]

  hcp_packer_registry {
    bucket_name = "vm-images-docker"
    description = "vm images"

    bucket_labels = {
      "product" = "vm image builder"
    }
  }
}

build {
  sources = [
    "amazon-ebs.ubuntu-base",
    "vsphere-iso.ubuntu-base"
  ]

  hcp_packer_registry {
    bucket_name = "vm-images-base"
    description = "vm images"

    bucket_labels = {
      "product" = "vm image builder"
    }
  }
}

then i get an error stating that multiple build blocks are not allowed when using packer registry.

Would someone be able to help me understand how i can publish 2 different types of image to packer registry in HCL within a single build (using a subset of the sources defined).

Many thanks in advance,
Joe