check if nic.NetworkInterfaceReferenceProperties.Primary field exists before trying to dereference it
check if nic.NetworkInterfaceReferenceProperties.Primary field exists before trying to dereference it

abhijeetgaiha/terraform-provider-azurerm,abhijeetgaiha/terraform-provider-azurerm,sebastus/terraform-provider-azurerm,sebastus/terraform-provider-azurerm,abhijeetgaiha/terraform-provider-azurerm,sebastus/terraform-provider-azurerm,thiagocaiubi/terraform-provider-azurerm,thiagocaiubi/terraform-provider-azurerm,thiagocaiubi/terraform-provider-azurerm