Azure / Azure/azure-cli

az resource update --remove doesn't work for dnsConfiguration.dnsServers property on web app

Open
#27,331 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign Azure CLI Team customer-reported feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

az resource update --remove doesn't work for dnsServers property on web app

### Related command

You can update web app and set custom DNS Server:

az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --set properties.dnsConfiguration.dnsServers="['IP.Add.re.ss']"

All OK, custom DNS server set.

But you cannot remove it:

az resource update --resource-group --name --resource-type "Microsoft.Web/sites" --remove properties.dnsConfiguration.dnsServers

Command completes successfully, but custom DNS Server is NOT removed.

### Errors

No errors

### Issue script & Debug output

-- removed due to NDA --

cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 16.024 seconds (init: 0.409, invoke: 15.615)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3362 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

### Expected behavior

az resource update --remove should remove property or property list as specified

### Environment Summary

azure-cli 2.52.0

core 2.52.0
telemetry 1.1.0

Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.