Skip to content

az network nic ip-config update command is overwriting existing applicationSecurityGroups #27936

Description

@OlafHaalstra

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions