Creating an Azure Static Web App with bring-your-own backend in a single step

XavierM 51 Reputation points
2023-11-21T16:28:47.9833333+00:00

Hi,

I am trying to automate the creation of an Azure Static Web App. For now I have successfuly provisionned and deployed code to a SWA in the Free tier using a single Azure DevOps pipeline (with Bicep code to create the resource and output the token).

Now I'm wondering if there is a way to automate the creation of a SWA in the Standard tier using a "bring your own" backend, like an already existing Function App for instance. When I do this in the portal I see a new linkedBackends property but I can't use it in my Bicep code as the property is read-only.

What is the current recommended method to achieve this in an "IaC" way ? First provision the SWA with a managed backend using Bicep, and use an AZ CLI script to link it to the existing Function App ?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,174 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.