Deploy a Highly Available Static Website on Azure Using Terraform

Baivab Mukhopadhyay
devdotcom

--

Architecture diagram

I see you want to host a static website on azure, well there are numerous ways to do that. You can use Azure static website hosting through Azure Blob Storage, Azure Static Web Apps, Azure App Service, Azure CDN, or Azure Functions. For single-page applications, you just need to load the initial index.html, and the frontend framework will handle the rest, such as loading components and making API calls. The best way is using Azure Front Door and Azure Storage Account to host your highly available static website.

Pairing Azure Front Door with Azure Blob Storage can establish an infrastructure for a highly available static website. This combination offers a cost-effective, straightforward, and reliable hosting solution for your .html, .css, and .js files. Since creating infrastructure through the Azure dashboard can be time-consuming, we will utilize Terraform, an IAC tool from HashiCorp, which enables users to build, modify, and version both cloud and on-premises resources efficiently.

Terraform is a tool that helps you set up and manage your computer systems and networks, whether they’re in the cloud or on your own servers. You write down what you need in easy-to-read files, which you can save, reuse, and share with others. Terraform makes it easy to create and manage everything from basic parts like servers…

--

--