az network bastion create --vnet-name does not accept resource Id #7855
Labels
Auto-Assign
Auto assign by bot
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Network - Bastion
Network
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
This issue is responsible by Azure service team.
Describe the bug
I wanted to deploy Bastion into its dedicated resource group where there is no Virtual Network present. For this reasons I tried to pass the virtual network's resource Id as
--vnet-name
but it didn't work as the CLI tried to append the whole resource ID to the resource Id of the subnet.Related command
az network bastion create
Errors
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
ERROR: (InvalidRequestFormat) Cannot parse the request.
Code: InvalidRequestFormat
Message: Cannot parse the request.
Exception Details: (InvalidJsonReferenceFormat) Reference Id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-bastion/providers/Microsoft.Network/virtualNetworks//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-network/providers/Microsoft.Network/virtualNetworks/vnet-prod/subnets/AzureBastionSubnet is not formatted correctly. The Id is expected to reference resources of type virtualNetworks/subnets. Path properties.ipConfigurations[0].properties.subnet.
Issue script & Debug output
WARNING: This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
ERROR: (InvalidRequestFormat) Cannot parse the request.
Code: InvalidRequestFormat
Message: Cannot parse the request.
Exception Details: (InvalidJsonReferenceFormat) Reference Id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-bastion/providers/Microsoft.Network/virtualNetworks//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-network/providers/Microsoft.Network/virtualNetworks/vnet-prod/subnets/AzureBastionSubnet is not formatted correctly. The Id is expected to reference resources of type virtualNetworks/subnets. Path properties.ipConfigurations[0].properties.subnet.
Expected behavior
--vnet-name
should accept resource id as well.Environment Summary
Additional context
No response
The text was updated successfully, but these errors were encountered: