Skip to content

Add privateIPAddressPrefixLength for az vmss command json output/input #32553

@alyssa1303

Description

@alyssa1303

Related command

az vmss update [--add]

Is your feature request related to a problem? Please describe.

Can we add support to create prefix IP address when adding secondary ip configuration using az vmss update --add command? Currently, the json output of the command doesn't include a property called privateIPAddressPrefixLength, so even when I added it, it'll be ignored and the created secondary ipconfig will just create a single IP instead of a prefix IP address range.

When running this command, it's supposed to create ipconfig with prefix address range instead of a single IP address

az vmss update --name test --resource-group $RG \
        --add virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations '{"name": "ipconfig2", "primary": false, "privateIpAddressPrefixLength": "28", "privateIpAddressVersion": "IPv4", "subnet": {"id": "'"$subnet_id"'", "resourceGroup": "'"$RG"'"}}'

Describe the solution you'd like

            {
              "applicationGatewayBackendAddressPools": null,
              "applicationSecurityGroups": null,
              "loadBalancerBackendAddressPools": null,
              "loadBalancerInboundNatPools": null,
              "name": "<ipconfig-name>",
              "primary": false,
              "privateIpAddressVersion": "IPv4",
              "privateIpAddressPrefixLength": "28", <- this line
              "publicIpAddressConfiguration": null,
              "subnet": {
                "id": "<subnet-id>",
                "resourceGroup": "<resource-group>"
              }
            }

Describe alternatives you've considered

Additional context

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotfeature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions