简体   繁体   中英

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

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM