Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the new Azure Static Web Apps #57

Open
1 of 3 tasks
manekinekko opened this issue May 26, 2020 · 8 comments
Open
1 of 3 tasks

Add support for the new Azure Static Web Apps #57

manekinekko opened this issue May 26, 2020 · 8 comments
Labels
enhancement New feature or request nx-deploy-it:provider:azure azure provider Wait for pulumi resource Pulumi needs to provide the resource

Comments

@manekinekko
Copy link

manekinekko commented May 26, 2020

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.

@manekinekko manekinekko added the enhancement New feature or request label May 26, 2020
@MitkoTschimev
Copy link
Contributor

MitkoTschimev commented May 26, 2020

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?

@MitkoTschimev
Copy link
Contributor

MitkoTschimev commented May 26, 2020

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)

@manekinekko
Copy link
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.

@MitkoTschimev
Copy link
Contributor

MitkoTschimev commented May 27, 2020

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

@MitkoTschimev MitkoTschimev added the Wait for pulumi resource Pulumi needs to provide the resource label May 27, 2020
@manekinekko
Copy link
Author

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

@MitkoTschimev
Copy link
Contributor

MitkoTschimev commented May 27, 2020

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

@MitkoTschimev
Copy link
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?

@manekinekko
Copy link
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
Labels
enhancement New feature or request nx-deploy-it:provider:azure azure provider Wait for pulumi resource Pulumi needs to provide the resource
Projects
None yet
Development

No branches or pull requests

2 participants