Hello Punitha Keswani,
Thanks for your question.
From the error message you provided, it seems that the IP config for your NIC does not have a reference to a subnet
I would recommend the following:
- Ensure you have a Subnet defined in the Vnet where the VM will be deployed
- Attach the subnet to the nic config. This can be done using https://learn.microsoft.com/en-us/powershell/module/az.network/new-aznetworkinterfaceipconfig?view=azps-11.6.0
You can test and confirm.
Also please see https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/associate-public-ip-address-vm?tabs=azure-portal
Please let me know if you have further questions
You can mark it 'Accept Answer' if this helped.