Skip to content

Public IP's PTR record cannot be removed by CLI #20971

@bangdu-ms

Description

@bangdu-ms

I was following this doc to remove a PTR record that set for public IP
https://docs.microsoft.com/en-us/azure/dns/dns-reverse-dns-for-azure-services#azure-cli-3

az network public-ip update --resource-group MyResourceGroup --name PublicIp --reverse-fqdn ""

However, following syntax error was returned.

az network public-ip update --resource-group bootcampdb --name VM01-ip --reverse-fqdn ""
argument --reverse-fqdn: expected one argument

TRY THIS:
az network public-ip update --resource-group MyResourceGroup --name MyIp --dns-name MyLabel --allocation-method Static
Update a public IP resource with a DNS name label and static allocation.

az network public-ip list
List all public IPs in a subscription.

az network public-ip list --resource-group MyResourceGroup
List all public IPs in a resource group.

https://docs.microsoft.com/en-US/cli/azure/network/public-ip#az_network_public_ip_list
Read more about the command in reference docs

I was able to do this using following PowerShell command
https://docs.microsoft.com/en-us/azure/dns/dns-reverse-dns-for-azure-services#azure-cli-3

PS /home/bang> $pip = Get-AzPublicIpAddress -Name "VM01-ip" -ResourceGroupName "bootcampdb"
PS /home/bang> $pip.DnsSettings.ReverseFqdn = ""
PS /home/bang> Set-AzPublicIpAddress -PublicIpAddress $pip

Name                     : VM01-ip
ResourceGroupName        : bootcampdb
Location                 : japaneast
Id                       : /subscriptions/00ad8164-fccc-4682-912a-966610f3d064/resourceGroups/bootcampdb/providers/Microsoft.Network/publicIPAddresses/VM01-ip
Etag                     : W/"8af51b91-cade-45d5-996d-2e69fd4c5db4"
ResourceGuid             : 43a61d14-cd1d-472f-8b36-5a24dcf242aa
ProvisioningState        : Succeeded
Tags                     :
PublicIpAllocationMethod : Static
IpAddress                : 20.44.176.182
PublicIpAddressVersion   : IPv4
IdleTimeoutInMinutes     : 4
IpConfiguration          : {
                             "Id": "/subscriptions/00ad8164-fccc-4682-912a-966610f3d064/resourceGroups/bootcampdb/providers/Microsoft.Network/networkInterfaces/vm01-win2016396/ipConfigurations/ipconfig1"
                           }
DnsSettings              : {
                             "DomainNameLabel": "vm01-bootcampdb",
                             "Fqdn": "vm01-bootcampdb.japaneast.cloudapp.azure.com",
                             "ReverseFqdn": ""
                           }
Zones                    : {}
Sku                      : {
                             "Name": "Basic",
                             "Tier": "Regional"
                           }
IpTags                   : []
ExtendedLocation         : null

So looks like there's either a typo in Doc or bug in CLI, can someone look into this?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions