Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az network bastion create --vnet-name does not accept resource Id #7855

Open
sassdawe opened this issue Aug 5, 2024 · 1 comment
Open

az network bastion create --vnet-name does not accept resource Id #7855

sassdawe opened this issue Aug 5, 2024 · 1 comment
Assignees
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.

Comments

@sassdawe
Copy link

sassdawe commented Aug 5, 2024

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

azure-cli                         2.62.0

core                              2.62.0
telemetry                          1.1.0

Extensions:
bastion                            1.0.2

Dependencies:
msal                              1.28.1
azure-mgmt-resource               23.1.1

Additional context

No response

@sassdawe sassdawe added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 5, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 5, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Network labels Aug 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Service Attention This issue is responsible by Azure service team. Network - Bastion labels Aug 5, 2024
@yonzhan yonzhan removed bug This issue requires a change to an existing behavior in the product in order to be resolved. Azure CLI Team The command of the issue is owned by Azure CLI team labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants