Ashok kumar
Ashok kumar

Reputation: 1611

The Resource under resource group was not found error

I just started learning Azure by following Pluralsight course. I'm following Author's video and doing the same in my system.

To create App service, used the following command.

>az webapp create -p MahaAppServicePlan -g MAHAResourceGroup -n datingapp -l

I have already created MahaAppServicePlan app service plan, and MAHAResourceGroup resource group. Now, I am trying to create datingapp webapp. Hence, issued the command like above. But, I am getting below error.

ResourceNotFound - The Resource 'Microsoft.Web/sites/datingapp' under resource group 'MAHAResourceGroup' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

I followed the above link with the hope that some suggestion could be helpful to me, but no luck.

When googled, I've got some resources, but with my existing knowledge, I am unable to tune it to my requirement. Can anyone please suggest me how to fix the above error!

Upvotes: 1

Views: 4626

Answers (1)

I'm not use to work with powershell but I have recreated your problem and I get this: enter image description here If you explore the log info you will see something like this: enter image description here I confirm that the error its that the app Name it's invalid, I have manually created the app service and see this: enter image description here

I can see in this last image that the Runtime its mandatory which in the documentation does not say(https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest#az-webapp-create). But if you add the -r "your choose runtime" you will execute the command with succed:

az webapp create -g MAHAResourceGroup -p MahaAppServicePlan -n webappteststackoverflow -r "DOTNETCORE|3.1"

enter image description here

You can see the available runtimes with this command:

az webapp list-runtimes

Upvotes: 1

Related Questions