Stackbit users now have the option to deploy their Jamstack sites to Microsoft Azure. We have partnered with Microsoft to leverage their Static Web Apps service, so those with Azure accounts can easily integrate and deploy their sites seamlessly.
If you want to deploy your new site to Azure but don’t have an account yet, sign up for one before proceeding.
There are two different paths available to users wishing to deploy to Azure: Add your Azure Active Directory Tenant ID to your Stackbit account. Use Stackbit’s Azure Marketplace app to create a new Azure Managed Resource Group. You’ll enter your Tenant ID and Managed Resource Group on Stackbit when creating your site.
Both paths will allow Stackbit to manage resources on your Azure account, and we will explain the difference between them in this document.
Add your Azure Tenant ID to your Stackbit account
Azure provides a way to authenticate into a user’s account and allow external services to manage and create new resources. Stackbit uses this approach with GitHub’s service, for example. Our platform can create new GitHub repositories on your behalf in your account and connect them to your private repositories. Another example is Netlify, where once you claim your account when building sites via Stackbit, the platform can automatically manage the services that deploy your site on their platform.
On Azure, this is called your Active Directory Tenant ID, (AD Tenant ID).
That is the preferred method of authentication if you are working on your own, as a part of a small team, or do not have an organizational resource management policy to follow. It will allow Stackbit to create new Resource Groups for Static Web Apps on Azure on your behalf. You don’t have to worry about overprovisioning. We abide by the policy limits of Azure, the same way that we do for services like Contentful. We will alert you when you are at capacity and prevent you from creating more sites than your Azure plan allows.
Find your Tenant ID
To find the Azure AD Tenant ID for your account, log into Azure https://portal.azure.com/#allservices.
From here, select the Azure Active Directory, which has a little blue pyramid icon (second row, second from the left). That will drop you into your Default Directory Overview
Under the “Tenant information” card, you will find your Tenant ID. Click on the blue copy icon to copy this ID to your clipboard.
Create a new site on Stackbit
Now, create a new site on Stackbit using the following link:
Once on the Stackbit Site Builder page, select your theme, static site generator, and headless CMS as you usually would. In the Azure card, paste the Tenant ID you found in the previous steps and hit ‘Connect.’
That will bring you to an authentication page from Microsoft. Accept the terms, and it will redirect you back to the Site Builder.
For the last step, hit the ‘Create Site’ button, and in a few moments, your site will be ready to edit in the Studio and deployed on Azure. Under the hood, Stackbit will provision the needed Static Web Apps Resource Group and configure it to deploy your new Jamstack site.
When you publish your site or page in Stackbit Studio, it will deploy it on Azure in your newly -created resource group.
Stackbit will store this Tenant ID, which means the next time you create a site using https://app.stackbit.com/create?deployment=azure you will not need to add it, and the platform can simply deploy the new resources automatically.
Use the Stackbit Azure Marketplace app to create a new Azure Managed Resource Group and supply that when creating your site.
Azure provides a way to authenticate into a specific Resource Group generated by a user. This route allows external services to connect and trigger actions inside the resource but not create or manage other resources.
That is the preferred method for developers who want more control over their resource usage, enterprise customers with organizational resource management policies, and agencies managing multiple applications across multiple Azure accounts.
The Stackbit Azure Marketplace App
To make it easy to create a new Azure Managed Resource Group for Static Web Apps, we have created the Stackbit Azure Marketplace App. Users can find this by searching for ‘Stackbit’ in the Azure Marketplace, which can be found through their portal site. You can also get to the app directly by clicking here
After pressing “Create,” you need to select or create a resource group and define the application name,
then agree to the terms and press “Create.”
After the application is ready, go to the resource to check it out.
On the created Managed Application page you can find information about the Stackbit application. In the Resource group, a single static index.html placeholder page was deployed. It contains some useful information about Stackbit. At the top of the page, you will find your Managed Resource Group ID. You’ll need it for the next step.
Visit the Stackbit Site Builder to create a new site.
After selecting your theme, static site generator, and headless CMS, you will need to paste your Tenant ID and Managed Resource Group ID into the Azure card. The Tenant ID is needed to verify that the user has access to the relevant resource group.
When you hit “Create Site,” it will deploy your new site to your specified Manages Resource Group.
When you publish your content changes in Stackbit Studio, it will deploy on your Azure website. Congratulations!
If you run into issues or unexpected behavior, please let us know and we’ll be happy to help.