azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

creating project: creating service backend: expecting only '1' resource tagged with 'azd-service-name: backend', but found '2'. Ensure a unique service resource is correctly tagged in your bicep files, and rerun provision tags: union(tags, { 'azd-service-name': 'backend' })

Open Gaigaisun opened this issue 1 year ago • 12 comments

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Error: creating project: creating service backend: expecting only '1' resource tagged with 'azd-service-name: backend', but found '2'. Ensure a unique service resource is correctly tagged in your bicep files, and rerun provision tags: union(tags, { 'azd-service-name': 'backend' })

Expected/desired behavior

I have deployed successfully the demo and I would like to know can we use this demo to deploy one more application with same resources except diffrent of search index appServicePlanName,backendServiceName,searchIndexName and AZURE_ENV_NAME

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Gaigaisun avatar Apr 27 '23 02:04 Gaigaisun

I also faced the same issue. Pls tell me how to deploy backend more than 1? where else should I change the tag name? (I already changed in main.bicep)

wantanej avatar May 18 '23 12:05 wantanej

Same issue here, changing the main.bicep doesn't help, and cannot find any other settings about the tag

zhongshuai-cao avatar May 23 '23 13:05 zhongshuai-cao

@zhongshuai-cao @wantanej Did you manage to solve this problem? I am stuck on it here too.

marceloricciardi avatar Jul 08 '23 15:07 marceloricciardi

image

I tried to change Line No. 7 in azure.yaml It worked for me.

wantanej avatar Jul 10 '23 01:07 wantanej

Hi all! The "backend" service name in azure.yaml must match the tags in infra/ folder.

If you are trying to deploy two backends to the same resource group, then yes, I think you could update both azure.yaml as well as main.bicep:

https://github.com/Azure-Samples/azure-search-openai-demo/blob/889f77b7bc25021721670be49a7f486e495fa271/infra/main.bicep#L107

cc @jongio in case there's a better way to do this that I'm forgetting.

pamelafox avatar Jul 10 '23 18:07 pamelafox

Can you add more details on what you are trying to accomplish? A description of your scenario would help me make a recommendation

jongio avatar Jul 12 '23 18:07 jongio

If want to have two different environment dev and prod for example.

preslavsh avatar Aug 02 '23 19:08 preslavsh

I tried deploying the same idea : different app service plan, different app service, different index and a different environment name in the pre existing resource group which contains another app which is deployed using the same repo. The following are the changes I made :

  1. In azure.yaml file: On line 7 I have changed the name from "backend" to "backendtest" 2)In main.bicep file: I have made a change in the module backend section, I made the following change to the tags attribute. tags: union(tags, { 'azd-service-name': 'backendtest' }) And used azd up to provision and deploy. Hoping it might help some one , Have a good day =)

suma-sai-paluri avatar Oct 03 '23 15:10 suma-sai-paluri

I've been manually adjusting the backend name to deploy multiple instances within the same resource group. I'm unsure if this approach is recommended.

I suggest making the service name configurable through an environment variable named BACKEND_SERVICE_NAME to enhance deployment versatility. Additionally, I'm looking for a method to configure the key in the .yml file. To my knowledge, only the value can be modified, not the key itself in a .yml. Any guidance on this would be appreciated.

zhongshuai-cao avatar Oct 04 '23 13:10 zhongshuai-cao

Hi all! The "backend" service name in azure.yaml must match the tags in infra/ folder.

If you are trying to deploy two backends to the same resource group, then yes, I think you could update both azure.yaml as well as main.bicep:

https://github.com/Azure-Samples/azure-search-openai-demo/blob/889f77b7bc25021721670be49a7f486e495fa271/infra/main.bicep#L107

cc @jongio in case there's a better way to do this that I'm forgetting.

It will be great if it is configurable with environment variable, like BACKEND_SERVICE_NAME, in my last comment https://github.com/Azure-Samples/azure-search-openai-demo/issues/154#issuecomment-1746901323

zhongshuai-cao avatar Oct 04 '23 13:10 zhongshuai-cao

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Dec 28 '23 01:12 github-actions[bot]

I've been manually adjusting the backend name to deploy multiple instances within the same resource group. I'm unsure if this approach is recommended.

I suggest making the service name configurable through an environment variable named BACKEND_SERVICE_NAME to enhance deployment versatility. Additionally, I'm looking for a method to configure the key in the .yml file. To my knowledge, only the value can be modified, not the key itself in a .yml. Any guidance on this would be appreciated.

UP!

ardab avatar Apr 09 '24 10:04 ardab