Deploy Azure Container Apps with Terraform
Use Terraform to define and deploy an Azure Container App with ingress, secrets, environment variables, and scaling rules.

Lab overview
Azure Container Apps is a serverless container platform that abstracts away cluster management, letting you run microservices and API backends without configuring Kubernetes nodes, load balancers, or ingress controllers. It supports automatic scaling (including scale-to-zero) based on HTTP traffic, queue depth, or custom metrics, making it ideal for event-driven and bursty workloads. Defining Container Apps infrastructure with Terraform ensures your environment, ingress, secrets, and scaling rules are declarative, version-controlled, and reproducible across environments.
In this lab, you will define a Container Apps environment backed by Log Analytics, deploy a container app from a public image with external ingress, configure secrets and environment variables through Terraform, and implement HTTP-based auto-scaling rules to control replica count based on concurrent requests.
Objectives
Upon completing this Intermediate level lab, you will be able to:
- Define an Azure Container Apps environment and Log Analytics workspace using Terraform
- Deploy a container app from a public container image using the azurerm_container_app resource
- Configure external ingress with target port and traffic weight settings
- Set environment variables and secrets in Terraform for container app configuration
- Define HTTP-based scaling rules to control replica count based on concurrent requests
- Verify the deployed container app is running and publicly accessible
Who is this lab for?
- Cloud Engineers who want to learn Infrastructure as Code patterns for serverless container workloads
- DevOps Practitioners looking to automate Azure Container Apps deployments using Terraform
- Developers familiar with containers who want to explore Container Apps with a declarative approach
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
Containerize and Deploy a Multi-Container Application to Azure Container Apps
Build Docker images for a restaurant menu app, push to ACR, and deploy frontend and backend containers to Azure Container Apps.
Deploying Azure Container Apps with Docker Hub Images
Learn to deploy containerized applications in Azure using Docker Hub images.
Introduction to Infrastructure as Code with Terraform on AWS
Write your first HCL configuration and deploy a DynamoDB table to AWS using Terraform's init, plan, and apply workflow.
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
Logging into Azure CLI
- 02
Creating a Terraform Configuration for the Container Apps Environment
1 automated check
- 03
Deploying a Container App with Ingress and Secrets
1 automated check
- 04
Configuring Scaling Rules and Verifying the Deployment
1 automated check
Skills validated
Not the lab you were looking for?
Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.