rp346
rp346

Reputation: 7038

Azure VM with no public DNS

I am trying to spinup Azure VM with no publick DNS using ARM template simple Linux VM

But I want dont want Publick DNS on this VM just private IP. I tried to remove following part related to public IP

"publicIPAddressName": "myPublicIP",
"publicIPAddressType": "Dynamic",

and

{
  "apiVersion": "[variables('apiVersion')]",
  "type": "Microsoft.Network/publicIPAddresses",
  "name": "[variables('publicIPAddressName')]",
  "location": "[resourceGroup().location]",
  "properties": {
    "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
    "dnsSettings": {
      "domainNameLabel": "[parameters('dnsLabelPrefix')]"
    }
  }
},

but i ran into trouble when running the template.

So would appreciate if anyone know how to do this ?

Thanks

Upvotes: 0

Views: 111

Answers (1)

Rick Rainey
Rick Rainey

Reputation: 11256

The networkInterface (NIC) resource depends on the publicIPAdress resource you deleted. So, when you deleted the publicIPAddress resource that broke the dependency chain.

To fix this, you need to remove the references to it in the networkInterface resource as highlighted in red here.

enter image description here

Upvotes: 2

Related Questions