az containerapp env
Note
This reference is part of the containerapp extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first time you run an az containerapp env command. Learn more about extensions.
Commands to manage Container Apps environments.
Commands
az containerapp env certificate |
Commands to manage certificates for the Container Apps environment. |
az containerapp env certificate delete |
Delete a certificate from the Container Apps environment. |
az containerapp env certificate list |
List certificates for an environment. |
az containerapp env certificate upload |
Add or update a certificate. |
az containerapp env create |
Create a Container Apps environment. |
az containerapp env dapr-component |
Commands to manage Dapr components for the Container Apps environment. |
az containerapp env dapr-component list |
List Dapr components for an environment. |
az containerapp env dapr-component remove |
Remove a Dapr component from an environment. |
az containerapp env dapr-component set |
Create or update a Dapr component. |
az containerapp env dapr-component show |
Show the details of a Dapr component. |
az containerapp env delete |
Delete a Container Apps environment. |
az containerapp env list |
List Container Apps environments by subscription or resource group. |
az containerapp env logs |
Show container app environment logs. |
az containerapp env logs show |
Show past environment logs and/or print logs in real time (with the --follow parameter). |
az containerapp env show |
Show details of a Container Apps environment. |
az containerapp env storage |
Commands to manage storage for the Container Apps environment. |
az containerapp env storage list |
List the storages for an environment. |
az containerapp env storage remove |
Remove a storage from an environment. |
az containerapp env storage set |
Create or update a storage. |
az containerapp env storage show |
Show the details of a storage. |
az containerapp env update |
Update a Container Apps environment. |
az containerapp env create
Create a Container Apps environment.
az containerapp env create --name
--resource-group
[--certificate-file]
[--certificate-password]
[--custom-domain-dns-suffix]
[--dapr-instrumentation-key]
[--docker-bridge-cidr]
[--infrastructure-subnet-resource-id]
[--internal-only {false, true}]
[--location]
[--logs-destination {azure-monitor, log-analytics, none}]
[--logs-workspace-id]
[--logs-workspace-key]
[--no-wait]
[--platform-reserved-cidr]
[--platform-reserved-dns-ip]
[--storage-account]
[--tags]
[--zone-redundant]
Examples
Create an environment with an auto-generated Log Analytics workspace.
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \
--location eastus2
Create a zone-redundant environment
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \
--location eastus2 --zone-redundant
Create an environment with an existing Log Analytics workspace.
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \
--logs-workspace-id myLogsWorkspaceID \
--logs-workspace-key myLogsWorkspaceKey \
--location eastus2
Required Parameters
Name of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The filepath of the certificate file (.pfx or .pem) for the environment's custom domain. To manage certificates for container apps, use az containerapp env certificate
.
The certificate file password for the environment's custom domain.
The DNS suffix for the environment's custom domain.
Application Insights instrumentation key used by Dapr to export Service to Service communication telemetry.
CIDR notation IP range assigned to the Docker bridge. It must not overlap with any Subnet IP ranges or the IP range defined in Platform Reserved CIDR, if defined.
Resource ID of a subnet for infrastructure components and user app containers.
Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource, therefore must provide infrastructureSubnetResourceId if enabling this property.
Location of resource. Examples: eastus2, northeurope.
Logs destination.
Workspace ID of the Log Analytics workspace to send diagnostics logs to. Only works with logs destination "log-analytics". You can use "az monitor log-analytics workspace create" to create one. Extra billing may apply.
Log Analytics workspace key to configure your Log Analytics workspace. Only works with logs destination "log-analytics". You can use "az monitor log-analytics workspace get-shared-keys" to retrieve the key.
Do not wait for the long-running operation to finish.
IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges.
An IP address from the IP range defined by Platform Reserved CIDR that will be reserved for the internal DNS server.
Name or resource ID of the storage account used for Azure Monitor. If this value is provided, Azure Monitor Diagnostic Settings will be created automatically.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Enable zone redundancy on the environment. Cannot be used without --infrastructure-subnet-resource-id. If used with --location, the subnet's location must match.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp env delete
Delete a Container Apps environment.
az containerapp env delete [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete an environment.
az containerapp env delete -n MyContainerappEnvironment -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Container Apps Environment.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp env list
List Container Apps environments by subscription or resource group.
az containerapp env list [--resource-group]
Examples
List environments in the current subscription.
az containerapp env list
List environments by resource group.
az containerapp env list -g MyResourceGroup
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp env show
Show details of a Container Apps environment.
az containerapp env show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show the details of an environment.
az containerapp env show -n MyContainerappEnvironment -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Container Apps Environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp env update
Update a Container Apps environment.
az containerapp env update [--certificate-file]
[--certificate-password]
[--custom-domain-dns-suffix]
[--ids]
[--logs-destination {azure-monitor, log-analytics, none}]
[--logs-workspace-id]
[--logs-workspace-key]
[--name]
[--no-wait]
[--resource-group]
[--storage-account]
[--subscription]
[--tags]
Examples
Update an environment's custom domain configuration.
az containerapp env update -n MyContainerappEnvironment -g MyResourceGroup \
--dns-suffix my-suffix.net --certificate-file MyFilePath \
--certificate-password MyCertPass
Optional Parameters
The filepath of the certificate file (.pfx or .pem) for the environment's custom domain. To manage certificates for container apps, use az containerapp env certificate
.
The certificate file password for the environment's custom domain.
The DNS suffix for the environment's custom domain.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Logs destination.
Workspace ID of the Log Analytics workspace to send diagnostics logs to. Only works with logs destination "log-analytics". You can use "az monitor log-analytics workspace create" to create one. Extra billing may apply.
Log Analytics workspace key to configure your Log Analytics workspace. Only works with logs destination "log-analytics". You can use "az monitor log-analytics workspace get-shared-keys" to retrieve the key.
Name of the Container Apps environment.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or resource ID of the storage account used for Azure Monitor. If this value is provided, Azure Monitor Diagnostic Settings will be created automatically.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for