How to Deploy Your First Azure Container App with Bicep

Prerequisites

Before we begin, make sure you have:

The Bicep Template

Here is a complete Bicep template that deploys a Container Apps Environment and a Container App with HTTPS ingress:

This template creates two resources: a Container Apps Environment (the shared hosting platform) and a Container App with external HTTPS ingress. The scale configuration allows the app to scale from 0 to 3 replicas based on demand.

Deploying the Template

Save the template as main.bicep and deploy it using the Azure CLI:

After deployment completes, the output will show the FQDN where your Container App is accessible.

Adding Secrets and Environment Variables

For real-world applications, you will need to configure secrets and environment variables. Here is how to extend the template:

Next Steps

Azure Container Apps with Bicep gives you a reproducible, version-controlled way to deploy containerized workloads. For more details, see the Container Apps overview and the Bicep resource reference.

Consider adding Log Analytics workspace integration, custom domains with managed certificates, and Dapr sidecar configuration as your application matures.

Daniel Moquist

Author

February 18, 2025

Daniel Moquist

Cloud Architect & DevOps Expert

Deploy Azure Container Apps with Bicep | Step-by-Step Guide