azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

webapp: How to use a vnet in a different resource group?

Open batanun opened this issue 6 years ago • 11 comments

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.

batanun avatar Apr 01 '20 17:04 batanun

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.

ghost avatar Apr 01 '20 23:04 ghost

appservice

yonzhan avatar Apr 01 '20 23:04 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

ghost avatar Apr 17 '20 15:04 ghost

When fixing this we need to consider the updates to the command for different RG and ASP.

panchagnula avatar Apr 17 '20 15:04 panchagnula

@calvinsID will this be handled with your current PR?

panchagnula avatar Jul 08 '20 01:07 panchagnula

@calvinsID will this be handled with your current PR?

No it wont, there will need to be a new fix

calvinsID avatar Jul 09 '20 20:07 calvinsID

@madsd I am assuming this is supported by using the resource ID but I am not sure - can you please comment? Thanks!

panchagnula avatar Jan 13 '21 17:01 panchagnula

Yes - subnet also accepts a resource id for the subnet. So either: --subnet ID or (--subnet NAME and --vnet-name NAME)

madsd avatar Jan 13 '21 17:01 madsd

@batanun can you verify that you can use this?

madsd avatar Jan 13 '21 17:01 madsd

@panchagnula can we close this, as it is supported through use of subnet resource ID.

madsd avatar Apr 14 '21 13:04 madsd

@batanun please re-open or create new issue if using SubNet ID doesn't resolve this. Thanks.

panchagnula avatar Apr 14 '21 16:04 panchagnula