az network nic ip-config update command is overwriting existing applicationSecurityGroups
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
When running:
```
az network nic ip-config update --name ipconfig1 --nice-name "NIC-Name" --resource-group rg-name --add "applicationSecurityGroups" "id=/subscription/.../asg-name"
```
The result is that only 1 ASG is now part of the NIC instead of being *added* to the list (overwrite instead of add)
I also tried explicitly adding it to an index but that doesn't exist:
```
az network nic ip-config update --name ipconfig1 --nice-name "NIC-Name" --resource-group rg-name --add "applicationSecurityGroups[0]" "id=/subscription/.../asg-name"
```
### Related command
az network nic ip-config update --name ipconfig1 --nice-name "NIC-Name" --resource-group rg-name --add "applicationSecurityGroups" "id=/subscription/.../asg-name"
### Errors
index 0 doesn't exist on applicationSecurityGroups
### Issue script & Debug output
Redacted for sensitivity, can be provided later if required
### Expected behavior
Should not delete existing ASGs
### Environment Summary
az --version
azure-cli 2.54.0
core 2.54.0
telemetry 1.1.0
Extensions:
datafactory 0.10.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/bin/python'
Extensions directory '/Users/user/.azure/cliextensions'
Python (Darwin) 3.11.6 (main, Oct 2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.