azure-search-openai-demo: unable to find a resource tagged with 'azd-service-name: backend'.

This issue is for a: (Deployment)

- [X] bug report -> please search issues before submitting

### Minimal steps to reproduce
Downloaded and deployed via the /Code page instructions, then ran "azd up" 

### Any log messages given by the failure
>Deploying services (azd deploy)

  (x) Failed: Deploying service backend

ERROR: getting target resource: resource not found unable to find a resource tagged with 'azd-service-name: backend'. Ensure the service resource is correctly tagged in your infrastructure configuration, and rerun provision.

### Expected/desired behavior
> Would expect it to just work.  
Files referenced?
main.bicep	tags: union(tags, { 'azd-service-name': 'backend' })
Azure.yaml	project: ./app/backend

### OS and Version?
> Windows 10

### azd version?
> run `azd version` and copy paste here.

### Versions
> 1.2.0 (commit 99ea7577f0df0df2ba34b677da189fafba18c0f7) 
All fresh installs of Python, GIT and Node.js

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 19 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I am not running azd up as I do not want my resource to be updated with empty data. The tag does match the one on Azure I can confirm. The same exact code with tags worked fine yesterday, but will not work today. This is most likely an issue from Azure side of things. There is only one azn env file.

Hi @delicpsyche , can you please explain in detail how you resolved the problem. Because I have successfully deployed the architecture once but I want to make few more changes to the code and deploy another app using same resources, I am able to use the rest of the resources in the way I need but I am facing a trouble using the app service where I have changed the backend URI(in .env file), and the tag ‘azd-service-name: backend’. Can you help me on this? thank you .

That tag must match the service name in azure.yaml, otherwise AZD doesn’t know where to deploy your code.