cannot find a diagnostic settings resource which terraform states is already present - azure verified modules
I deployed 3 virtual machines using the azure avm modules.
The code configures the diagnostic settings for the VMs.
I deleted one of the VM from the portal and run the terraform code again.
The code fails stating that the diagnostic setting resource for the deleted and recreated VM already exist. I cannot find that resource. I also tried to remove the whole resource group which should contain the resource. But running the code the error represent itself.
The 3 VMs are configured at the same way using the same version of the avm module.
│ Error: A resource with the ID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg-xxxxx-xxxxx-uks-001/providers/Microsoft.Compute/virtualMachines/vm-xxxx-sql-01|diag-sql-01" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_monitor_diagnostic_setting" for more information.
│
I cannot find the diag-sql-01 resource which anyway should have been removed when I deleted the resource group rg-xxxxx-xxxxx-uks-001
Thank you in advance for your help.