Depends_on for count resources

Use-case:
Create X amount of VM’s with a public ip assigned to each VM.

Research so far has found a previous issue ticket created - dated 2017. (https://github.com/hashicorp/terraform/issues/15285) where @apparentlymart discussed this issue.

The fix was that in terraform v0.12 explicit support was added for individual constants being added for reference in a depends_on.

My Repo: https://github.com/CPWu/terraform_azure_compute

Attempting to create a module that will create X number of azure linux computes, the first VM is created perfectly but the second compute unit on a “2X” request does not get created properly. The dynamic IP is created but does not get assigned to the NIC that’s associated to the second VM. My understanding is that because the count’ed’ resources are being seen as a single node and the IP is not available at time of NIC creation. Looked into the for_each construct implemented in v0.12.6 but that doesn’t look like that will solve my issue.

Anyone with ideas? This has been posted on Github and StackOverflow with several interested people but no resolution.