Skip to content

Add support for the new Azure Static Web Apps #57

Open

Description

@manekinekko

Is your feature request related to a problem? Please describe.
I'd like to help add support for the new Azure Static Web Apps

Check which provider is affected:

  • Azure
  • AWS
  • Google Cloud Platform

Additional context
Checkout our samples repo here.

Activity

  1. MitkoTschimev commented on May 26, 2020

    @MitkoTschimev
    Contributor

    Not really familiar with Azure static web apps :)
    I am trying to understand what exactly the benefits are in comparison to static hosting and an azure function which can be already handled by nx-deploy-it

    So currently I can already create a nx workspace with an angular app and nestjs as backend.
    Both are deployable with Nx DeployIt

    • frontend with cdn
    • backend as serverless function
      The only thing which is currently missing is the automated dependency (infrastructure urls) to each other. Means you need to deploy first the backend and use the created endpoint with the frontend.

    How can a Azure static app help here? What makes it different?

  2. MitkoTschimev commented on May 26, 2020

    @MitkoTschimev
    Contributor

    Ok just read a bit more about it now and see some key features.
    Thinking about how this could be integrated...

    Nx DeployIt is asking at the beginning (scan schematic) which application you want to integrate with infrastructure as code.

    Option A:
    If you select minimum a frontend app with azure option we could ask him how to deploy it

    • static hosting
    • static web app

    Option B:
    If you select a frontend and a backend app with azure option we could ask him to combine both as Static web app -> This way we have the full potential of the static web app with frontend and backend together

    The next thing is that Nx DeployIt is working with Pulumi under the hood.
    Currently there is no Static Web App resource.

    Here again 2 options:

    Option A:
    Waiting for the support in terraform / pulumi

    Option B:
    Writing our own Component / Custom Resources which is provisioning the Static Web App based on azure cli commands (if azure self already supports this -> i guess it's this one)

  3. manekinekko commented on May 26, 2020

    @manekinekko
    Author

    Azure Static Web Apps is still in preview. CLI support is not available yet (az webapp is another service).

    Here are all the benefits of switching to SWA comparing to blob storage:

    • Free web hosting for static content like HTML, CSS, JavaScript, and images.
    • Integrated API support provided by Azure Functions.
    • First-party GitHub integration where repository changes trigger builds and deployments.
    • Globally distributed static content, putting content closer to your users.
    • Free SSL certificates, which are automatically renewed.
    • Custom domains to provide branded customizations to your app.
    • Seamless security model with a reverse-proxy when calling APIs, which requires no CORS configuration.
    • Authentication provider integrations with Azure Active Directory, Facebook, Google, GitHub, and Twitter.
    • Customizable authorization role definition and assignments.
    • Back-end routing rules enabling full control over the content and routes you serve.
    • Generated staging versions powered by pull requests enabling preview versions of your site before publishing.
    • and more

    So, if you are using Plumi for Azure management, then you probably need to wait for them to add SWA support.

    Cheers.

  4. MitkoTschimev commented on May 27, 2020

    @MitkoTschimev
    Contributor

    Than we have to wait a bit till Microsoft provides all the APIs to create this recourses.

    After that terraform / pulumi is really quick to adapt and we can for sure integrate it in a beautiful way

  5. manekinekko commented on May 27, 2020

    @manekinekko
    Author

    We already provide the ARM template to create and manage your SWA instances. However, they are still in PREVIEW ;)

  6. MitkoTschimev commented on May 27, 2020

    @MitkoTschimev
    Contributor

    Preview is ok ;) but if you already provide an ARM template its perfect!!

    We can use this resource from pulumi!
    https://github.com/pulumi/examples/blob/master/azure-ts-arm-template/index.ts

  7. MitkoTschimev commented on Dec 25, 2020

    @MitkoTschimev
    Contributor

    I think there is finally a solution in pulumi available

    @manekinekko Can you verify if this is the resource for a static web app?

  8. manekinekko commented on Jan 22, 2021

    @manekinekko
    Author

    @MitkoTschimev I don't so because we haven't published official ARM template for SWA yet. So this plugin might be creating a App Service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions