Skip to content

"az functionpp vnet-integration add" requires the "--vnet" argument, even when using a resource ID in the "--subnet" field. #30235

@pgbfnf

Description

@pgbfnf

Describe the bug

"az functionpp vnet-integration add" requires the "--vnet" argument, even when using a resource ID in the "--subnet" field.
Image
Image

Related command

az functionapp vnet-integration add --name --resource-group --subnet

Errors

the following arguments are required: --vnet

Issue script & Debug output

az functionapp vnet-integration add --name fnf-geai-func-d1-use2-01 --resource-group fnf-rg-geai-development --subnet $subnetid --debug
cli.knack.cli: Command arguments: ['functionapp', 'vnet-integration', 'add', '--name', 'fnf-geai-func-d1-use2-01', '--resource-group', 'fnf-rg-geai-development', '--subnet', '/subscriptions/03f39f76-065e-46fd-a116-ba6085c71481/resourceGroups/FNF-RG-Networking-DevAndSandbox/providers/Microsoft.Network/virtualNetworks/vn-devandsandbox-use2-01/subnets/sn-10.164.76.112_28', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0000016970A60E00>, <function OutputProducer.on_global_arguments at 0x0000016970B7DDA0>, <function CLIQuery.on_global_arguments at 0x0000016970BAB920>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'functionapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: appservice                0.193        79       270
cli.azure.cli.core: serviceconnector          0.067        20       299
cli.azure.cli.core: Total (2)                 0.260        99       569
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0
cli.azure.cli.core: Loaded 97 groups, 569 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : functionapp vnet-integration add
cli.azure.cli.core: Command table: functionapp vnet-integration add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x00000169724C5A80>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\ADM-Pete.Bollwerk\.azure\commands\2024-10-31.17-00-48.functionapp_vnet-integration_add.8628.log'.
az_command_data_logger: command args: functionapp vnet-integration add --name {} --resource-group {} --subnet {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x000001697250FEC0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x000001697250FF60>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x00000169726140E0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22functionapp+vnet-integration+add%22%2C+%22parameters%22%3A+%22--name%2C--subnet%2C--resource-group%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.60.0%22%2C+%22errorType%22%3A+%22MissingRequiredParameters%22%2C+%22correlationId%22%3A+%22646760f3-1023-469d-a9ae-3a542965e95b%22%2C+%22subscriptionId%22%3A+%2203f39f76-065e-46fd-a116-ba6085c71481%22%2C+%22eventId%22%3A+%22270450e7-97a8-474f-896a-10893a9b5375%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.azclierror: NoneType: None

cli.azure.cli.core.azclierror: the following arguments are required: --vnet
az_command_data_logger: the following arguments are required: --vnet

Examples from AI knowledge base:
az functionapp vnet-integration add -g MyResourceGroup -n MyFunctionapp --vnet MyVnetName --subnet MySubnetName -s [slot]
Add a regional virtual network integration to a functionapp

az functionapp vnet-integration add -g MyResourceGroup -n MyFunctionapp --vnet '/subscriptions/[sub id]/resourceGroups/[MyResourceGroup]/providers/Microsoft.Network/virtualNetworks/[MyVnetName]' --subnet MySubnetName -s [slot]
Add a regional virtual network integration to a functionapp using vnet resource id

az functionapp vnet-integration add -g MyResourceGroup -n MyFunctionapp --vnet MyVnetName --subnet '/subscriptions/[sub id]/resourceGroups/[MyResourceGroup]/providers/Microsoft.Network/virtualNetworks/[MyVnetName]/subnets/MySubnetName' -s [slot]
Add a regional virtual network integration to a functionapp using subnet resource id

https://aka.ms/cli_ref
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x00000169724C5D00>]
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 2.102 seconds (init: 0.425, invoke: 1.676)
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 4315 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\ADM-Pete.Bollwerk\.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

ideally, when using a resourceID for the subnet, the vnet argument should not be required

Environment Summary

versions:
azure-cli": "2.60.0",
"azure-cli-core": "2.60.0",
"azure-cli-telemetry": "1.1.0",

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botFunctionsaz functionappService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions