Having two subnets on the same Terraform plan

Hello,

I have created a vNET, a subnet and a VM on that subnet with a public IP. In addition, I’m trying to provisioning Azure AD DS using the module “aadds”. But, while running the terraform init command, I’m facing with the below error. Please assist.

│ Error: Duplicate resource “azurerm_subnet” configuration

│ on main.tf line 87:
│ 87: resource “azurerm_subnet” “subnet” {

│ A azurerm_subnet resource named “subnet” was already declared at main.tf:26,1-35. Resource names must be unique per type in each module.

Thank you. Anand