microsoft / vscode-azurestaticwebapps

Azure Static Web Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps
MIT License
86 stars 32 forks source link

Issue with Creating Static Web App - Error: "[Provider "/subscriptions/<mySubscriptionID>/providers/Microsoft.Resources" does not have resource type "resourceGroups"]" #866

Closed ubaidullahshuaib closed 6 months ago

ubaidullahshuaib commented 7 months ago

Description: I encountered an issue while attempting to create a static web app in Visual Studio Code using the steps outlined in the documentation. After entering the required information, I received the following error message:

[Provider "/subscriptions/<mySubscriptionID>/providers/Microsoft.Resources" does not have resource type "resourceGroups"] image

Steps to Reproduce:

  1. Followed the steps in the "Create a static web app" documentation.
  2. Entered necessary information in Visual Studio Code.
  3. Encountered the error at step 4 of the documentation.

Attempted Solutions:

Additional Information:

Expected Outcome: A successful creation of the static web app without encountering the mentioned error.

Environment:

Reference: Original Microsoft Learn Q&A Page

Note: This might be related to a Visual Studio Code extension issue. Please advise on how to proceed or if further information is needed.

bwateratmsft commented 7 months ago

Transferring this to the Static Web Apps extension repository.

alexweininger commented 7 months ago

This means that somehow the Microsoft.Resources provider doesn't have the resourceGroups resource. You should be able to fix it by unregistering and re-registering the Microsoft.Resources provider.

Using the Azure CLI, you can do this like so:

az provider unregister --namespace Microsoft.Resources
az provider register --namespace Microsoft.Resources

When using these commands, make sure you have the right subscription selected. You can use az account set --subscription "subscription name" to change the selected subscription.

Similar to https://github.com/microsoft/vscode-azurefunctions/issues/3620

AzCode-Bot commented 6 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!