Usage of variable along with count.index while assigning the name of resource in release 0.12.24

How can I use variable along with count.index while assigning the name of resource in release 0.12.24,

Earlier in v0.11, I was assigning the name of the resource from variable file appended with count.index using interpolation syntax during multiple resource creation. But this does not work with latest v0.12.24.

Older syntax in v0.11 was:

resource “azurerm_virtual_machine” “vm” {
count = “{var.count_vms}" name = "{var.vm_name}-${1+count.index}”

Now in v0.12, this does not work.
I had tried multiple options like below:
1.) name = format(var.vm_name,"-%s", count.index)
2.) name = format(var.vm_name"-%s", count.index)
3.) name = format(var.vm_name+"-%s", count.index)

This format thing works if I don’t use the variable value and pass the fixed name in double quotes e.g. name = format(“VM-Name-%s”, count.index)

Not able to find out the way.
Can anyone please help here.