Deleting SWA resource doesn't unlink BYO Functions backend
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
If you create a SWA resource in Standard tier and link it with an existing Azure Functions backend (as per https://learn.microsoft.com/en-us/azure/static-web-apps/functions-bring-your-own), then delete the SWA resource, it doesn't unlink it from the Functions app, so if you were to try and link the Functions app again, it will fail, stating it is already linked and can only be linked once.
We found the problem when deploying https://newpatiente2e.github.io/docs/ (which uses BYO backend to talk to Forms Recognizer), so I'll use that as an example of how to do it.
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Follow https://newpatiente2e.github.io/docs/ to deploy the environment using `azd`
2. Delete the SWA resource via the portal
3. Redeploy using `azd provision`
4. See error
**Expected behavior**
Deployment to succeed, adding the SWA resource back after it was previously deleted.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.