Deployment Slots: cannot link backend with a preexisting azure static web apps configuration

Nhlanhla Nkosi 0 Reputation points
2024-01-23T16:49:20.5966667+00:00

Error on Linking preview environment to a deployment slot of a function app that the prod environment is linked to.

I've got a Static Web App with a preview environment called "staging." I also have a function app that has a deployment slot called staging. The SWA staging environment won't let me link the staging API to the function app's staging deployment slot with the error: "cannot link backend with a preexisting Azure static web apps configuration."

Visually:

Azure Function App

-------<FunctionAppName>(Production/Default)
-------<FunctionAppName>-staging

SWA:
---- Production [API linked to <FunctionAppName> (default slot)]
-----Staging (preview env) [API failed link to <FunctionAppName>/staging (staging slot)]

When the restriction says only 1 app may link to a function, does this include the deployment slots?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,103 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.