DEV Community

Renicius Pagotto
Renicius Pagotto

Posted on

Azure App Spaces (preview) Overview

Hi everyone, in today's post we're going to talk about Azure App Spaces, a new service from Azure (Microsoft) that promises to facilitate the creation and deployment of applications.

This new service has two main functions, one of them helps to define the best service(s) to be used by the application through an analysis that Azure itself carries out in the repository.

The other feature is to select an out-of-the-box template that you may to use and Azure will take care of deploying the entire application and necessary infrastructure. There are currently 4 main templates you can choose from, as seen below.

  • React Container App with C# API and PostgreSQL

  • React Web App with Python API and MongoDB

  • Static React Web App with Node.js API and MongoDB

  • React Web App with C#/.NET and SQL Database

Note: All information has been extracted from the Azure Portal, so it can be changed at any time as the service is still in preview.

You can see the default page of Azure App Spaces bellow

Image description

Microsoft Definition

To better understand what this new service is all about, here is an official explanation from Microsoft's documentation.

Azure App Spaces is an intelligent service for developers that reduces the complexity of creating and managing web apps. It helps you identify the correct services for your applications on Azure and provides a user-friendly management experience that's streamlined for the development process.

App Spaces offers all the benefits of deploying an app via existing Azure services, like Container Apps, Static Web Apps, and App Service, with an experience that's focused on making you develop and deploy faster.

Azure App Spaces is still in preview, so be aware that potential bugs may be encountered.

Note: The only supported service is GitHub for now, but as the service is in preview, new ways of integrations may be added in the future.

Using an existing repository – How does it work?

I have prepared two different scenarios to better explain how the service works.

Scenario 1

In the first scenario, we're going to use a simple HTML page. Basically I just created a simple HTML file on GitHub and pushed the code in the main branch, you can do the same thing.

On the Azure App Spaces default page, select the Start deploying option as shown below.

Image description

Select the Organization, Repository and Branch you'd like to deploy.

Image description

After that, the service will analyze the entire repository and advice you about the best service. In my case, Azure suggested using Azure Static Web App demonstrating good accuracy, as it was in fact the most suitable service.

Image description

Scrolling down, we need to define some information about the application and also the details of creating the Azure Static Web App.

Image description

Once deployment begins, magic happens. On deployment, Azure creates and adds a CI/CD (GitHub Actions) pipeline to the repository you selected to use. Although the pipeline is very simple, it's enough to deploy the application.

Image description

Image description

The resources were automatically created in Azure, so you don't have to worry about that either.

Image description

Scenario 2

In the second example, we will use a .NET project that I implemented. Again, go to the App Spaces home page, select the Start deploying option and select the new repository with the .NET project. The suggestion was to use Azure App Service and again the choice was very assertive.

Image description

Once the deploy button is clicked again, a new CI/CD pipeline will be added to the repository and the required resources will be created automatically.

Using Templates - How does it work?

Now, let's demonstrate how to use templates. Basically if you want to start a new app, you can use a out-of-the-box template and just adapt according to your needs.

As I said, we currently have 4 templates available to be used and for this scenario, we'll select the React Web App template with C#/.NET and SQL Database.

Select the template, define some information and click the deploy button.

Image description

Image description

Azure will start creating your application and the resources run it. The entire process take a while to be completed.

Image description

In summary, once the process is completed, we have a new GitHub repository with the application (front-end and back-end) and a CI/CD pipeline to deploy the code.

Also in the repository we have a directory called infra, inside we find a bicep file (IaC) which is basically the application infrastructure at code level where all the configuration necessary to run the application is ready, without the need for any adjustments.

Image description

The CI/CD pipeline is responsible for deploying the infrastructure by executing the biceps file and also the application itself.

Image description

You will have an entire application up and running without the need to set a connection between back-end and database or between front-end and back-end.

Powerful, isn't it?

Brief Summary

Let's highlight the main points:

  • The resource only supports GitHub
  • There are same templates with out-of-the-box application.
  • A CI/CD pipeline is used to deploy the infrastructure together bicep file when using a template.
  • CI/CD pipeline is also used to deploy the application
  • All application settings and keys (secrets) are included in the pipeline or in bicep, you don't need to adjust anything.

Note: I haven't tested other scenarios but the process is basically the same as we demonstrated above. I also don't know if the accuracy of the analysis will be good in complex scenarios, but I'll bring new tests in the future.

Highlighting an important point, when using templates, a new repository is created containing all the files needed to deploy both the application and the infrastructure, it's possible to redeploy if necessary, while using an existing repository, Azure will just create the pipeline of CI/CD to deploy the application, you don't have the biceps file to create the infrastructure.


Although the feature is in preview, it's an excellent option to help and improve software delivery in companies. With its analysis capacity, it will certainly be a very useful tool to help you decide which is the best resource to use in a given scenario.

The templates will speed up the creation and delivery of the software to customers, since all aspects have already been adjusted, so the focus will be entirely on the functionalities that will need to be developed.

One more thing to mention, when using templates, in addition to just creating the application and infrastructure, Azure provides good security practices, such as creating an instance of the Azure Key Vault already set with the application, the connection between the back-end and the database is done via managed identity, among many other things that I could see by analyzing the repository. It's really not just the experience of creating a solution and executing it, it's the experience of having a ready-to-use solution, with a good level of security associated, with the best possible practices.


Top comments (0)