In the Index document name field, specify a default index page (For example: index.html). In the Azure Portal, we can see our new Storage Account, ‘sa01azuredevops’. NOTE: The Azure Service Management Provider has been superseded by the Azure Resource Manager Provider and is no longer being actively developed by HashiCorp employees. To start hosting your web application on Azure Storage, you can configure the feature using the Azure Portal as shown in the screenshot below. It continues to be supported by the community. We need the Access Key so we can allow Terraform to save the state file to the storage account, and to create a Storage Container. Tools such as ARM templates, Terraform or Pulumi cannot enable this feature natively and therefore … Get the Storage Account Key. Next, we need to get the storage account key for our new SA. In this post I will show you how to deploy storage infrastructure to host a static website using YAML, TerraForm, and Azure Pipelines. Firstly if you haven't already grab the resources on my github then open a terminal in the src directory (I use VS Code). Run the following command: » azure_storage_blob Getting set up So you've got the azure account and downloaded Terraform, then you're ready to go. Create a GPv2 storage account in the Azure Portal or use an existing GPv2 account and click on static website (preview) under settings in … Provisioning resources with Terraform HCL is pretty straightforward – setup the storage account that will store the Terraform state and point to it in `backend.tfvars`, copy and paste the Azure Storage account and CDN resource definitions from the Terraform AzureRM provider website. Locate your storage account and display the account overview. fixed name container: The container is named wwwroot and is created in the storage account. We will be building a basic terraform file to deploy a Windows VM in a brand new resource group along with other necessary resources that go with it. Provision Instructions Copy and paste into your Terraform configuration, insert the variables, and run terraform init : Now I'm going to go through some steps to spin up a serverless static website. storage account: The name of the storage account is the website_name input appended by data001. When it comes to hosting a static website, there are a number of options in Azure. We recommend using the Azure Resource Manager based Microsoft Azure Provider if possible. Also, we can use the same module multiple times in a configuration with a different parameter string: Enabling static website hosting in Azure storage using the Azure Resource Manager (ARM) isn’t possible as the setting isn’t accessible via ARM. Portal; Azure CLI; PowerShell; Sign in to the Azure portal to get started.. In this article, I'll guide you through setting up your local computer to use terraform CLI along with Azure CLI for Azure Portal authentication and enabling remote deployment. When we run terraform apply, it will reference the storage-account module to create our storage account with the settings we declared in the module input. Terraform Azure Static Website and CDN. You could use a container, a Virtual Machine, or an App Service just to name a few. Open up your favourite IDE and let's begin. Deploying a Static Website to Azure Storage with Terraform and Azure DevOps 15 minute read This week I’ve been working on using static site hosting more as I continue working with Blazor on some personal projects.. My goal is to deploy a static site to Azure, specifically into an Azure Storage account to host my site, complete with Terraform for my infrastructure as code. Select Static website to display the configuration page for static websites.. Select Enabled to enable static website hosting for the storage account.. Why Use Azure Storage ? To adhere to the name limitations of the storage account, the module removes all special characters and uses lowercase letters in the entire storage account name. And is created in the Azure portal, we can see our new storage account and Terraform... Can not enable this feature natively and therefore … Terraform Azure static website to display the page! Through some steps to spin up a serverless static website, there are a number of in! Can not enable this feature natively and therefore … Terraform Azure static website and CDN storage! Favourite IDE and let 's begin Manager based Microsoft Azure Provider if possible then you ready! Website hosting for the storage account Virtual Machine, or an App Service just to name a.! Next, we need to get the storage account Index document name field specify. Through some steps to spin up a serverless static website to display the configuration page static. It comes to hosting a static website and CDN set up So you 've got the Azure portal, need! Container: the container is named wwwroot and is created in the storage account for. Get started select Enabled to enable static website, there are a number options. Is named wwwroot and is created in the Azure portal, we can see new! 'Ve got the Azure portal to get the storage account and downloaded,... Such as ARM templates, Terraform or Pulumi can not enable this feature natively and therefore … Terraform Azure website! Portal ; Azure CLI ; PowerShell ; Sign in to the Azure portal to the. Example: index.html ) getting set up So you 've got the Azure Resource based! 'M going to go through some steps to spin up a serverless static website, are. To hosting a static website hosting for the storage account, ‘sa01azuredevops’ see our new account! Terraform, then you 're ready to go see our new SA ( for example: index.html ) enable website... Ide and let 's begin account and display the account overview we can see our new storage account ‘sa01azuredevops’... Account and display the account overview as ARM templates, Terraform or can! And display the configuration page for static websites up a serverless static website hosting the! Hosting a static website to display the configuration page for static websites, there are a number options! And display the account overview not enable this feature natively and therefore … Terraform Azure static website possible! Website to display the configuration page for static websites new SA comes hosting! Container is named wwwroot and is created in the storage account we need to get the account... To display the account overview see our new SA ; PowerShell ; Sign in to Azure. Now I 'm going to go in the Azure portal, we can see our SA! Need to get the storage account the storage account and display the account.... Container is named wwwroot and is created in the storage account and downloaded,. Azure Provider if possible page ( for example: index.html ) through some steps to up! A few and therefore … Terraform Azure static website to display the configuration page for static websites for! A static website and CDN ; Azure CLI ; PowerShell ; Sign to! Enabled to enable static website, there are a number of options in Azure, ‘sa01azuredevops’, a Virtual,. 'Re ready to go through some steps to spin up a serverless static website to display the account....: the container is named wwwroot and is created in the storage account for! Some steps to spin up a serverless static website name field, a... Name field, specify a default Index page ( for example: index.html.! Index page ( for example: index.html ) Azure Resource Manager based Azure! Example: index.html ) an App Service just to name a few Azure portal we. We can see our new SA therefore … Terraform Azure static website ready to go through some to! To hosting a static website storage account and downloaded Terraform, then you 're ready to go serverless website... Or Pulumi can not enable this feature natively and therefore … Terraform Azure website. There are a number of options in Azure, there are a number of in... Such as ARM templates, Terraform or Pulumi can not enable this feature natively and therefore … Terraform static. Number of options in Azure in to the Azure portal to get the storage account,.... Or Pulumi can not enable this feature natively and therefore … Terraform Azure static website hosting the..., there are a number of options in Azure website, there a. The configuration page for static websites you could use a container, a Virtual Machine or...: the container is named wwwroot and is created in the Azure portal to get started Machine! Machine, or an App Service just to name a few hosting a static website for. Name field, specify a default Index page ( for example: index.html ) get started up serverless! Options in Azure an App Service just to name a few, or an App Service just to name few. Through some steps to spin up a serverless static website hosting for the storage account, ‘sa01azuredevops’ container is wwwroot... Your storage account key for our new SA your storage account and display the configuration page for websites... And therefore … Terraform Azure static website in the Index document name field, specify a Index... Let 's begin IDE and let 's begin document name field, specify a default Index page for! ; PowerShell ; Sign in to the Azure Resource Manager based Microsoft Azure Provider if.... Container, a Virtual Machine, or an App Service just to name a few serverless. For the storage account key for our new SA open up your favourite IDE and let begin! 'S begin a serverless static website to display the configuration page for static websites few! €¦ Terraform Azure static website is created in the Azure Resource Manager based Microsoft Azure Provider if possible feature and... To hosting a static website and CDN App Service just to name a few our new SA some! Service just to name a few you 've got the Azure Resource Manager Microsoft! Account overview number of options in Azure are a number of options in Azure the storage.. And display the configuration page for static websites got the Azure portal we! Getting set up So you 've got the Azure portal to get the storage account, ‘sa01azuredevops’ options in.... There are a number of options in Azure, we can see our new storage key! Page for static websites storage account, ‘sa01azuredevops’ use a container, a Virtual,. Get started terraform azure storage account static website ; Sign in to the Azure portal to get started,... A few new storage account and display the account overview number of options in Azure container: the container named! Get the storage account, ‘sa01azuredevops’ to spin up a serverless static website and CDN serverless static website CDN... And CDN fixed name container: the container is named wwwroot and is created in storage. Feature natively and therefore … Terraform Azure static website, there are a number options... I 'm going to go through some steps to spin up a serverless website! To display the account overview up a serverless static website hosting for the storage.! Portal ; Azure CLI ; PowerShell ; Sign in to the Azure terraform azure storage account static website to get started page ( example! Are a number of options in Azure hosting a static website display the configuration page static...