Error during linking Container App as backend for Static Web App

Mikhail Smal 10 Reputation points
2023-07-02T19:39:08.0866667+00:00

I am trying to link a Container App with enabled ingress and external access (perfectly reachable and requestable directly) as backend to a Static Web App (Standard plan). I always get "An error has occurred" with no further explanation.

I tried to do that in the Portal, with az cli, with REST API and with Pulumi. The result is always the same. The link cannot be created.

I tried to recreate the container app and its environment in different regions: West Europe, West US 2, Central US. No luck. I tried different names of the container app and its environment, with and without dashes. Nothing helps.

Enabled/disabled system-assigned managed identity for the Static Web App makes no difference either.

What can be the problem?

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
419 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
926 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,166 Reputation points MVP
    2023-08-21T16:45:36.4033333+00:00

    Hello @Mikhail Smal ! , @Matt Brewer !

    I have spoken with the support Team and they recognized the issue

    It is fixed now for all supported regions

    Please check if yours is OK too!

    Thank you

    In case any answer helped kindly mark it as Accepted and upvote so others can benefit as well!

    Regards

    1 person found this answer helpful.
    0 comments No comments

  2. Konstantinos Passadis 19,166 Reputation points MVP
    2023-07-02T21:47:53.47+00:00

    Hello @Mikhail Smal !

    Welcome to Microsoft QnA!

    Have you gone through this link :

    https://video2.skills-academy.com/en-us/azure/static-web-apps/apis-overview &

    https://video2.skills-academy.com/en-us/azure/static-web-apps/apis-container-apps

    If you read the details :

    "Both URLs point to the same API endpoint. The endpoint on the container app must have the /api prefix, since Static Web Apps matches requests made to /api and proxies the entire path to the linked resource. "

    Front end web applications often call back end APIs for data and services. Azure Static Web Apps provides built-in serverless API endpoints via integration with Azure services.

    Key features of Azure Static Web Apps APIs include:

    Integrated security with direct access to user authentication and role-based authorization data.

    Seamless routing that makes the /api route available to the front-end web app without requiring custom CORS rules.

    API options

    The following Azure services can be integrated with Azure Static Web Apps:

    Azure Functions
    Azure API Management
    Azure App Service
    Azure Container Apps
    • Managed APIs: By default, Azure Static Web Apps automatically integrates with Azure Functions as an API backend. You deploy an API with your static web app without managing a separate Azure Functions resource.
    • Bring your own APIs: You can integrate your static web app with existing APIs hosted in Azure Functions, API Management, App Service, or Container Apps. You manage and deploy the API resources yourself.

    Note

    Bring your own APIs is only available in the Azure Static Web Apps Standard plan. Built-in, managed Azure Functions APIs are available in all Azure Static Web Apps plans.

    API constraints

    The following constraints apply to all API backends:

    • Each static web app environment can only be configured with one type of backend API at a time.
    • The API route prefix must be /api.
    • Route rules for APIs only support redirects and securing routes with roles.
    • Only HTTP requests are supported for APIs. WebSocket, for example, is not supported.
    • The maximum duration of each API request 45 seconds.
    • Network isolated backends are not supported.

    The following constraints apply to Bring your own API backends:

    • An application must be deployed to your static web app before requests to the /api route can be resolved.
    • Bring your own API backends cannot be linked to a Static Web Apps pull request environment.

    Because we dont have much details about your deployement i can offer these instructions

    If you could post more details we can provide more help

    In case this answer helped kindly mark it as Accepted and Upvote , or post your details of the implementation

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


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.