Unable to Create Windows VMSS via terraform deployment

Nagajan Modhwadia 0 Reputation points
2024-09-18T11:53:06.8966667+00:00

Hello all, I am very confused and am seeking help!

I am trying to create a Windows Virtual machine scale set however when i try to create it I am met with the below message -

│ Error: creating Windows Virtual Machine Scale Set (Subscription: "21d331e5-8cec-46ed-b6a3-9a3e7197ac5f"

│ Resource Group Name: "rg-monolith-web-f8wa" │ Virtual Machine Scale Set Name: "vmss-monapi-q5l"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: VMScaleSetDnsRecordsInUse: DNS records requested by the resource /subscriptions/21d331e5-8cec-46ed-b6a3-9a3e7197ac5f/resourceGroups/RG-MONOLITH-WEB-F8WA/providers/Microsoft.Compute/virtualMachineScaleSets/vmss-monapi-q5l are already being used. Please check details for the dns records in use. 

│ 
│   with module.vmss_api.azurerm_windows_virtual_machine_scale_set.scale_sets, 
│   on ../Modules/terraform-azure-vmss/main.tf line 65, in resource "azurerm_windows_virtual_machine_scale_set" "scale_sets": 
│   65: resource "azurerm_windows_virtual_machine_scale_set" "scale_sets" { 
│

In the terraform code I am not creating ANY DNS records.

I can see that the VNET i am connecting too has two DNS servers which I have access too however the new server has not created any DNS records on this server. I believe it would need to join the domain first to even add these DNS records in.

Any advice would be greatly appreciated as i'm running out of hair to pullout

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,792 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.