How to assign multiple "ip_configurations" to one NIC in Azure VMSS without hard code?

Hi,
I’m trying to use Terraform to provision my vmss. I need around 40 ip configurations to be assigned to a sungle network interface of the vmss. I tried to use ‘count’ but this “ip_configuration” is a dependent resource hence it failed. Any idea how to do it without hard code?
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine_scale_set#ip_configuration
Thanks!