Using only option in provisioner with azure-arm

Hello, I’m going over a conversion from json to hcl2 of our templates and I have one for azure where we use two sources (one for Linux and one for Windows) and then the provisioners are run based on the only option, at least this was the way it worked in json, but in hcl I get the “Warning: an ‘only’ option was passed, but not all matches were found for the given build” message and nothing gets built.

The template is like below:

source “azure-arm” “azure-linux” {…}
source “azure-arm” “azure-windows” {…}
build {
sources = [“source.azure-arm.azure-linux”, “source.azure-arm.azure-windows”]
provisioner “shell” {

only = [“azure-arm.azure-linux”]
}
provisioner “ansible” {

only = [“azure-arm.azure-linux”]
}
provisioner “shell” {

only = [“azure-arm.azure-linux”]
}
provisioner “powershell” {

only = [“azure-arm.azure-windows”]
}
provisioner “ansible” {

only = [“azure-arm.azure-windows”]
}

Worth mentioning that (almost) the same template (but obviously created for AWS) works just fine with amazon-ebs instead of azure-arm. Is there an issue with azure-arm and using only?

Thanks,