webapp: How to use a vnet in a different resource group?
How can we use a vnet in a different resource group, when creating an app service environment?
Example: az appservice ase create -g containers-rg -n test-ase --vnet-name test-vn --subnet containers-subnet
Here I want to create a new ASE in a resource group called "containers-rg". And I want it to use the vnet "test-vn". But since that vnet is in a different resource group (as we want it), this command fails with the error:
"The Resource 'Microsoft.Network/virtualNetworks/test-vn' under resource group 'containers-rg' was not found."
Surely there must be a way to use a vnet in a different resource group? Our resource groups are very highly specified, and we don't want to put "non-networking" resources in the "networking" resource group.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 9c25ad9b-c5f9-cb3d-3cb0-96ac61977561
- Version Independent ID: 75c933fe-5869-22ef-a8b6-981557fb9fc1
- Content: az appservice ase
- Content Source: src/azure-cli/azure/cli/command_modules/appservice/_help.py
- Service: app-service
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.
appservice
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
When fixing this we need to consider the updates to the command for different RG and ASP.
@calvinsID will this be handled with your current PR?
@calvinsID will this be handled with your current PR?
No it wont, there will need to be a new fix
@madsd I am assuming this is supported by using the resource ID but I am not sure - can you please comment? Thanks!
Yes - subnet also accepts a resource id for the subnet. So either: --subnet ID or (--subnet NAME and --vnet-name NAME)
@batanun can you verify that you can use this?
@panchagnula can we close this, as it is supported through use of subnet resource ID.
@batanun please re-open or create new issue if using SubNet ID doesn't resolve this. Thanks.