Deploy a Web App with Storage Account using ARM Templates
Write an ARM template to deploy an App Service with a Storage Account. Configure connection strings using listKeys() and wire up app settings for secure access.

Lab overview
Azure Resource Manager (ARM) templates are a declarative Infrastructure as Code (IaC) solution for defining, deploying, and managing Azure resources using JSON. Real infrastructure is rarely a single resource: a web application needs a hosting plan, the app itself, and the backing services it reads and writes. ARM templates express all of that in one file, and Resource Manager works out the order to create it in. Where a resource genuinely depends on another existing first, the dependsOn property makes that ordering explicit, so a Storage Account is fully provisioned before anything tries to read its keys.
The harder problem in a multi-resource deployment is wiring the resources together without hardcoding secrets. ARM solves this with template functions that run at deployment time. resourceId() builds a fully qualified reference to another resource in the template, and listKeys() calls the resource provider to retrieve its access keys during the deployment itself. Combined with concat(), this lets a template assemble a Storage Account connection string and inject it straight into an App Service's application settings, so the credential is never written into source control and never copied by hand. The deployment becomes fully repeatable: run it against an empty resource group and you get a working, connected application.
Objectives
By completing this Intermediate challenge, you will be able to:
- Author an ARM template that deploys multiple interdependent Azure resources in a single deployment.
- Control resource creation order with the
dependsOnproperty. - Retrieve Storage Account access keys at deployment time using the
listKeys()andresourceId()functions. - Assemble a Storage Account connection string with
concat()and inject it into App Service application settings. - Deploy a multi-resource template to a resource group using the Azure CLI and verify the resulting configuration.
Prerequisites
Before attempting this challenge, you should be comfortable with:
- ARM template structure and syntax
- Parameters, variables, and outputs
- Using
uniqueString()andconcat()functions - Deploying templates with Azure CLI
- Creating Storage Accounts with ARM templates
Recommended Lab: Deploy an Azure Web App using an ARM Template
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed, not multiple choice, real-world proficiency.
More labs like this
Deploy a Storage Account with ARM Templates
Write and deploy an ARM template to create a Storage Account with a blob container. Apply your knowledge of parameters, variables, and nested resources.
Creating a Web App on Azure App Service using Azure Portal
Learn how to create, configure, and deploy a web application using Azure App Service through the Azure Portal's interface.
Deploy an Azure Web App using an ARM Template
Learn how to deploy an Azure Web App using an ARM Template using Azure CLI
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Challenge Scenario
2 automated checks
Skills validated
Not the lab you were looking for?
Browse 200+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.