Microsoft.Web containerApps 2021-03-01
Article 10/25/2024
1 contributor
Feedback
In this article
This resource type has migrated to the Microsoft.App namespace. For the new resource type, see Microsoft.App containerApps .
For information about the migration, see Action Required: Namespace migration from Microsoft.Web to Microsoft.App in March 2022 .
Bicep resource definition
The containerApps resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Web/containerApps resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Web/containerApps@2021-03-01' = {
kind: 'string'
location: 'string'
name: 'string'
properties: {
configuration: {
activeRevisionsMode: 'string'
ingress: {
allowInsecure: bool
external: bool
targetPort: int
traffic: [
{
latestRevision: bool
revisionName: 'string'
weight: int
}
]
transport: 'string'
}
registries: [
{
passwordSecretRef: 'string'
server: 'string'
username: 'string'
}
]
secrets: [
{
name: 'string'
value: 'string'
}
]
}
kubeEnvironmentId: 'string'
template: {
containers: [
{
args: [
'string'
]
command: [
'string'
]
env: [
{
name: 'string'
secretRef: 'string'
value: 'string'
}
]
image: 'string'
name: 'string'
resources: {
cpu: int
memory: 'string'
}
}
]
dapr: {
appId: 'string'
appPort: int
components: [
{
metadata: [
{
name: 'string'
secretRef: 'string'
value: 'string'
}
]
name: 'string'
type: 'string'
version: 'string'
}
]
enabled: bool
}
revisionSuffix: 'string'
scale: {
maxReplicas: int
minReplicas: int
rules: [
{
azureQueue: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
queueLength: int
queueName: 'string'
}
custom: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {
{customized property}: 'string'
}
type: 'string'
}
http: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {
{customized property}: 'string'
}
}
name: 'string'
}
]
}
}
}
tags: {
{customized property}: 'string'
}
}
Property values
Configuration
Name
Description
Value
activeRevisionsMode
ActiveRevisionsMode controls how active revisions are handled for the Container app: <list><item>Multiple: multiple revisions can be active. If no value if provided, this is the default</item><item>Single: Only one revision can be active at a time. Revision weights can not be used in this mode</item></list>
'multiple' 'single'
ingress
Ingress configurations.
Ingress
registries
Collection of private container registry credentials for containers used by the Container app
RegistryCredentials []
secrets
Collection of secrets used by a Container app
Secret []
Container
Name
Description
Value
args
Container start command arguments.
string[]
command
Container start command.
string[]
env
Container environment variables.
EnvironmentVar []
image
Container image tag.
string
name
Custom container name.
string
resources
Container resource requirements.
ContainerResources
ContainerAppProperties
Name
Description
Value
configuration
Non versioned Container App configuration properties.
Configuration
kubeEnvironmentId
Resource ID of the Container App's KubeEnvironment.
string
template
Container App versioned application definition.
Template
ContainerResources
Name
Description
Value
cpu
Required CPU in cores, e.g. 0.5
int
memory
Required memory, e.g. "250Mb"
string
CustomScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe custom scale rule.
CustomScaleRuleMetadata
type
Type of the custom scale rule eg: azure-servicebus, redis etc.
string
Dapr
Name
Description
Value
appId
Dapr application identifier
string
appPort
Port on which the Dapr side car
int
components
Collection of Dapr components
DaprComponent []
enabled
Boolean indicating if the Dapr side car is enabled
bool
DaprComponent
Name
Description
Value
metadata
Component metadata
DaprMetadata []
name
Component name
string
type
Component type
string
version
Component version
string
Name
Description
Value
name
Metadata property name.
string
secretRef
Name of the Container App secret from which to pull the metadata property value.
string
value
Metadata property value.
string
EnvironmentVar
Name
Description
Value
name
Environment variable name.
string
secretRef
Name of the Container App secret from which to pull the environment variable value.
string
value
Non-secret environment variable value.
string
HttpScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe http scale rule.
HttpScaleRuleMetadata
Ingress
Name
Description
Value
allowInsecure
Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
bool
external
Bool indicating if app exposes an external http endpoint
bool
targetPort
Target Port in containers for traffic from ingress
int
traffic
TrafficWeight []
transport
Ingress transport protocol
'auto' 'http' 'http2'
Microsoft.Web/containerApps
Name
Description
Value
kind
Kind of resource.
string
location
Resource Location.
string (required)
name
The resource name
string (required)
properties
ContainerApp resource specific properties
ContainerAppProperties
tags
Resource tags
Dictionary of tag names and values. See Tags in templates
QueueScaleRule
Name
Description
Value
auth
Authentication secrets for the queue scale rule.
ScaleRuleAuth []
queueLength
Queue length.
int
queueName
Queue name.
string
RegistryCredentials
Name
Description
Value
passwordSecretRef
The name of the Secret that contains the registry login password
string
server
Container Registry Server
string
username
Container Registry Username
string
Scale
Name
Description
Value
maxReplicas
Optional. Maximum number of container replicas. Defaults to 10 if not set.
int
minReplicas
Optional. Minimum number of container replicas.
int
rules
Scaling rules.
ScaleRule []
ScaleRule
ScaleRuleAuth
Name
Description
Value
secretRef
Name of the Container App secret from which to pull the auth params.
string
triggerParameter
Trigger Parameter that uses the secret
string
Secret
Name
Description
Value
name
Secret Name.
string
value
Secret Value.
string Constraints: Sensitive value. Pass in as a secure parameter.
Template
Name
Description
Value
containers
List of container definitions for the Container App.
Container []
dapr
Dapr configuration for the Container App.
Dapr
revisionSuffix
User friendly suffix that is appended to the revision name
string
scale
Scaling properties for the Container App.
Scale
TrafficWeight
Name
Description
Value
latestRevision
Indicates that the traffic weight belongs to a latest stable revision
bool
revisionName
Name of a revision
string
weight
Traffic weight assigned to a revision
int
ARM template resource definition
The containerApps resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Web/containerApps resource, add the following JSON to your template.
{
"type": "Microsoft.Web/containerApps",
"apiVersion": "2021-03-01",
"name": "string",
"kind": "string",
"location": "string",
"properties": {
"configuration": {
"activeRevisionsMode": "string",
"ingress": {
"allowInsecure": "bool",
"external": "bool",
"targetPort": "int",
"traffic": [
{
"latestRevision": "bool",
"revisionName": "string",
"weight": "int"
}
],
"transport": "string"
},
"registries": [
{
"passwordSecretRef": "string",
"server": "string",
"username": "string"
}
],
"secrets": [
{
"name": "string",
"value": "string"
}
]
},
"kubeEnvironmentId": "string",
"template": {
"containers": [
{
"args": [ "string" ],
"command": [ "string" ],
"env": [
{
"name": "string",
"secretRef": "string",
"value": "string"
}
],
"image": "string",
"name": "string",
"resources": {
"cpu": "int",
"memory": "string"
}
}
],
"dapr": {
"appId": "string",
"appPort": "int",
"components": [
{
"metadata": [
{
"name": "string",
"secretRef": "string",
"value": "string"
}
],
"name": "string",
"type": "string",
"version": "string"
}
],
"enabled": "bool"
},
"revisionSuffix": "string",
"scale": {
"maxReplicas": "int",
"minReplicas": "int",
"rules": [
{
"azureQueue": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"queueLength": "int",
"queueName": "string"
},
"custom": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {
"{customized property}": "string"
},
"type": "string"
},
"http": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {
"{customized property}": "string"
}
},
"name": "string"
}
]
}
}
},
"tags": {
"{customized property}": "string"
}
}
Property values
Configuration
Name
Description
Value
activeRevisionsMode
ActiveRevisionsMode controls how active revisions are handled for the Container app: <list><item>Multiple: multiple revisions can be active. If no value if provided, this is the default</item><item>Single: Only one revision can be active at a time. Revision weights can not be used in this mode</item></list>
'multiple' 'single'
ingress
Ingress configurations.
Ingress
registries
Collection of private container registry credentials for containers used by the Container app
RegistryCredentials []
secrets
Collection of secrets used by a Container app
Secret []
Container
Name
Description
Value
args
Container start command arguments.
string[]
command
Container start command.
string[]
env
Container environment variables.
EnvironmentVar []
image
Container image tag.
string
name
Custom container name.
string
resources
Container resource requirements.
ContainerResources
ContainerAppProperties
Name
Description
Value
configuration
Non versioned Container App configuration properties.
Configuration
kubeEnvironmentId
Resource ID of the Container App's KubeEnvironment.
string
template
Container App versioned application definition.
Template
ContainerResources
Name
Description
Value
cpu
Required CPU in cores, e.g. 0.5
int
memory
Required memory, e.g. "250Mb"
string
CustomScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe custom scale rule.
CustomScaleRuleMetadata
type
Type of the custom scale rule eg: azure-servicebus, redis etc.
string
Dapr
Name
Description
Value
appId
Dapr application identifier
string
appPort
Port on which the Dapr side car
int
components
Collection of Dapr components
DaprComponent []
enabled
Boolean indicating if the Dapr side car is enabled
bool
DaprComponent
Name
Description
Value
metadata
Component metadata
DaprMetadata []
name
Component name
string
type
Component type
string
version
Component version
string
Name
Description
Value
name
Metadata property name.
string
secretRef
Name of the Container App secret from which to pull the metadata property value.
string
value
Metadata property value.
string
EnvironmentVar
Name
Description
Value
name
Environment variable name.
string
secretRef
Name of the Container App secret from which to pull the environment variable value.
string
value
Non-secret environment variable value.
string
HttpScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe http scale rule.
HttpScaleRuleMetadata
Ingress
Name
Description
Value
allowInsecure
Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
bool
external
Bool indicating if app exposes an external http endpoint
bool
targetPort
Target Port in containers for traffic from ingress
int
traffic
TrafficWeight []
transport
Ingress transport protocol
'auto' 'http' 'http2'
Microsoft.Web/containerApps
Name
Description
Value
apiVersion
The api version
'2021-03-01'
kind
Kind of resource.
string
location
Resource Location.
string (required)
name
The resource name
string (required)
properties
ContainerApp resource specific properties
ContainerAppProperties
tags
Resource tags
Dictionary of tag names and values. See Tags in templates
type
The resource type
'Microsoft.Web/containerApps'
QueueScaleRule
Name
Description
Value
auth
Authentication secrets for the queue scale rule.
ScaleRuleAuth []
queueLength
Queue length.
int
queueName
Queue name.
string
RegistryCredentials
Name
Description
Value
passwordSecretRef
The name of the Secret that contains the registry login password
string
server
Container Registry Server
string
username
Container Registry Username
string
Scale
Name
Description
Value
maxReplicas
Optional. Maximum number of container replicas. Defaults to 10 if not set.
int
minReplicas
Optional. Minimum number of container replicas.
int
rules
Scaling rules.
ScaleRule []
ScaleRule
ScaleRuleAuth
Name
Description
Value
secretRef
Name of the Container App secret from which to pull the auth params.
string
triggerParameter
Trigger Parameter that uses the secret
string
Secret
Name
Description
Value
name
Secret Name.
string
value
Secret Value.
string Constraints: Sensitive value. Pass in as a secure parameter.
Template
Name
Description
Value
containers
List of container definitions for the Container App.
Container []
dapr
Dapr configuration for the Container App.
Dapr
revisionSuffix
User friendly suffix that is appended to the revision name
string
scale
Scaling properties for the Container App.
Scale
TrafficWeight
Name
Description
Value
latestRevision
Indicates that the traffic weight belongs to a latest stable revision
bool
revisionName
Name of a revision
string
weight
Traffic weight assigned to a revision
int
The containerApps resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log .
To create a Microsoft.Web/containerApps resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/containerApps@2021-03-01"
name = "string"
kind = "string"
location = "string"
body = jsonencode({
properties = {
configuration = {
activeRevisionsMode = "string"
ingress = {
allowInsecure = bool
external = bool
targetPort = int
traffic = [
{
latestRevision = bool
revisionName = "string"
weight = int
}
]
transport = "string"
}
registries = [
{
passwordSecretRef = "string"
server = "string"
username = "string"
}
]
secrets = [
{
name = "string"
value = "string"
}
]
}
kubeEnvironmentId = "string"
template = {
containers = [
{
args = [
"string"
]
command = [
"string"
]
env = [
{
name = "string"
secretRef = "string"
value = "string"
}
]
image = "string"
name = "string"
resources = {
cpu = int
memory = "string"
}
}
]
dapr = {
appId = "string"
appPort = int
components = [
{
metadata = [
{
name = "string"
secretRef = "string"
value = "string"
}
]
name = "string"
type = "string"
version = "string"
}
]
enabled = bool
}
revisionSuffix = "string"
scale = {
maxReplicas = int
minReplicas = int
rules = [
{
azureQueue = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
queueLength = int
queueName = "string"
}
custom = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {
{customized property} = "string"
}
type = "string"
}
http = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {
{customized property} = "string"
}
}
name = "string"
}
]
}
}
}
})
tags = {
{customized property} = "string"
}
}
Property values
Configuration
Name
Description
Value
activeRevisionsMode
ActiveRevisionsMode controls how active revisions are handled for the Container app: <list><item>Multiple: multiple revisions can be active. If no value if provided, this is the default</item><item>Single: Only one revision can be active at a time. Revision weights can not be used in this mode</item></list>
'multiple' 'single'
ingress
Ingress configurations.
Ingress
registries
Collection of private container registry credentials for containers used by the Container app
RegistryCredentials []
secrets
Collection of secrets used by a Container app
Secret []
Container
Name
Description
Value
args
Container start command arguments.
string[]
command
Container start command.
string[]
env
Container environment variables.
EnvironmentVar []
image
Container image tag.
string
name
Custom container name.
string
resources
Container resource requirements.
ContainerResources
ContainerAppProperties
Name
Description
Value
configuration
Non versioned Container App configuration properties.
Configuration
kubeEnvironmentId
Resource ID of the Container App's KubeEnvironment.
string
template
Container App versioned application definition.
Template
ContainerResources
Name
Description
Value
cpu
Required CPU in cores, e.g. 0.5
int
memory
Required memory, e.g. "250Mb"
string
CustomScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe custom scale rule.
CustomScaleRuleMetadata
type
Type of the custom scale rule eg: azure-servicebus, redis etc.
string
Dapr
Name
Description
Value
appId
Dapr application identifier
string
appPort
Port on which the Dapr side car
int
components
Collection of Dapr components
DaprComponent []
enabled
Boolean indicating if the Dapr side car is enabled
bool
DaprComponent
Name
Description
Value
metadata
Component metadata
DaprMetadata []
name
Component name
string
type
Component type
string
version
Component version
string
Name
Description
Value
name
Metadata property name.
string
secretRef
Name of the Container App secret from which to pull the metadata property value.
string
value
Metadata property value.
string
EnvironmentVar
Name
Description
Value
name
Environment variable name.
string
secretRef
Name of the Container App secret from which to pull the environment variable value.
string
value
Non-secret environment variable value.
string
HttpScaleRule
Name
Description
Value
auth
Authentication secrets for the custom scale rule.
ScaleRuleAuth []
metadata
Metadata properties to describe http scale rule.
HttpScaleRuleMetadata
Ingress
Name
Description
Value
allowInsecure
Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
bool
external
Bool indicating if app exposes an external http endpoint
bool
targetPort
Target Port in containers for traffic from ingress
int
traffic
TrafficWeight []
transport
Ingress transport protocol
'auto' 'http' 'http2'
Microsoft.Web/containerApps
Name
Description
Value
kind
Kind of resource.
string
location
Resource Location.
string (required)
name
The resource name
string (required)
properties
ContainerApp resource specific properties
ContainerAppProperties
tags
Resource tags
Dictionary of tag names and values.
type
The resource type
"Microsoft.Web/containerApps@2021-03-01"
QueueScaleRule
Name
Description
Value
auth
Authentication secrets for the queue scale rule.
ScaleRuleAuth []
queueLength
Queue length.
int
queueName
Queue name.
string
RegistryCredentials
Name
Description
Value
passwordSecretRef
The name of the Secret that contains the registry login password
string
server
Container Registry Server
string
username
Container Registry Username
string
Scale
Name
Description
Value
maxReplicas
Optional. Maximum number of container replicas. Defaults to 10 if not set.
int
minReplicas
Optional. Minimum number of container replicas.
int
rules
Scaling rules.
ScaleRule []
ScaleRule
ScaleRuleAuth
Name
Description
Value
secretRef
Name of the Container App secret from which to pull the auth params.
string
triggerParameter
Trigger Parameter that uses the secret
string
Secret
Name
Description
Value
name
Secret Name.
string
value
Secret Value.
string Constraints: Sensitive value. Pass in as a secure parameter.
Template
Name
Description
Value
containers
List of container definitions for the Container App.
Container []
dapr
Dapr configuration for the Container App.
Dapr
revisionSuffix
User friendly suffix that is appended to the revision name
string
scale
Scaling properties for the Container App.
Scale
TrafficWeight
Name
Description
Value
latestRevision
Indicates that the traffic weight belongs to a latest stable revision
bool
revisionName
Name of a revision
string
weight
Traffic weight assigned to a revision
int