Skip to content

Commit 20524c0

Browse files
committed
[network] Add: az network nic create: created new --ip_config-name parameter for ip configuration name customization
1 parent 66ceec4 commit 20524c0

File tree

1 file changed

+6
-1
lines changed
  • src/azure-cli/azure/cli/command_modules/network

1 file changed

+6
-1
lines changed

src/azure-cli/azure/cli/command_modules/network/custom.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4330,6 +4330,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
43304330
"/networkSecurityGroups/{}",
43314331
),
43324332
)
4333+
args_schema.ip_config_name = AAZStrArg(
4334+
options=["--ip-config-name"],
4335+
help="Name of the Ip configuration",
4336+
required=False
4337+
)
43334338
args_schema.extended_location._registered = False
43344339
args_schema.ip_configurations._registered = False
43354340
args_schema.nsg._registered = False
@@ -4343,7 +4348,7 @@ def pre_operations(self):
43434348
args.extended_location.name = args.edge_zone
43444349
args.extended_location.type = "EdgeZone"
43454350
ip_configuration = {
4346-
"name": "ipconfig1",
4351+
"name": args.ip_config_name,
43474352
"private_ip_address": args.private_ip_address,
43484353
"private_ip_address_version": args.private_ip_address_version, # when address doesn't exist, version should be ipv4 (default)
43494354
"private_ip_allocation_method": "Static" if has_value(args.private_ip_address) else "Dynamic",

0 commit comments

Comments
 (0)