SOLVED

broke my pipelines

Copper Contributor

During AzureRmWebAppDeployment

 

Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'MyAppName'.

 

any ideas?

6 Replies

Thank you,@fevinsetter, for your question,

According to this error message, the resource type "Microsoft.Web/Sites" with the name "MyAppName" could not be found in your Azure account. This could be due to a variety of factors, including:

  • The resource is unavailable: Check to see if the resource has been added to your Azure account.
  • Incorrect resource name: Make sure the name specified in the deployment script corresponds to the resource's name in your Azure account.
  • Incorrect subscription: Ensure that the correct subscription is selected in the Azure CLI or Azure PowerShell session.

For more information, see the following articles:

Because you have provided limited information for me to respond to, my response is general. If you are comfortable, we could look into the matter further. Could you please provide more information about the following items:

  1. Subscription details for Azure: Confirm their subscription and the name of the resource group that contains the resource.
  2. Details on the deployment script: Request the exact script, including the resource type, name, and any parameters.
  3. If possible, request access to their Azure portal to determine whether the resource exists, and whether any related error messages exist.
  4. Recent changes: Determine whether any recent changes to the resource or environment, such as updates or configuration changes, may have contributed to the problem.

 

@fevinsetter 

Can you elaborate more? Btw, saw a similar on below for your insight:

 

https://stackoverflow.com/questions/58107017/azure-app-service-deploy-failed-to-get-resource-id-for-...

 

@2MuchC0ff33 

 

Could this be caused by my lack of knowledge of RBAC and/or Managed Identity?

 

fevinsetter_0-1675650680089.png

 

Do I need other RBAC on this sb4NgUi App Service?

fevinsetter_1-1675650849890.png

 

 

 

@fevinsetter If the Azure deployment requires specific access rights and identity configurations, a lack of knowledge in RBAC (Role-Based Access Control) and Managed Identity could certainly contribute to this issue. How did you find the resource shared by @Kidd_Ip  (https://stackoverflow.com/questions/58107017/azure-app-service-deploy-failed-to-get-resource-id-for-...)?

best response confirmed by fevinsetter (Copper Contributor)
Solution
OK, turns out I had renamed by Subscription. I guess I assumed that the YAML pipeline would use the sub number and not worry about the name....wrong. By renaming the sub in the YAML pipeline in AzureRmWebAppDeployment, it started working again. Thanks everybody.
Nice one. Glad it is all working for you again. :)
1 best response

Accepted Solutions
best response confirmed by fevinsetter (Copper Contributor)
Solution
OK, turns out I had renamed by Subscription. I guess I assumed that the YAML pipeline would use the sub number and not worry about the name....wrong. By renaming the sub in the YAML pipeline in AzureRmWebAppDeployment, it started working again. Thanks everybody.

View solution in original post