CmdID

CmdID / az / az containerapp / az containerapp env

az containerapp env create

Create a Container Apps environment. Azure CLI reference

5 examples 2 options Its page in the Azure CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Create an environment with an auto-generated Log Analytics workspace.

az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup --location eastus2Identify
-nName of the Container Apps environment.
-gName of resource group.
--locationLocation of resource.

Create a zone-redundant environment

az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup --location eastus2 --zone-redundantIdentify
-nName of the Container Apps environment.
-gName of resource group.
--locationLocation of resource.
--zone-redundantEnable zone redundancy on the environment.

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 eastus2Identify
-nName of the Container Apps environment.
-gName of resource group.
--logs-workspace-idWorkspace ID of the Log Analytics workspace to send diagnostics logs to.
--logs-workspace-keyLog Analytics workspace key to configure your Log Analytics workspace.
--locationLocation of resource.

Create an environment with workload profiles enabled.

az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup --location eastus2 --enable-workload-profilesIdentify
-nName of the Container Apps environment.
-gName of resource group.
--locationLocation of resource.
--enable-workload-profilesBoolean indicating if the environment is enabled to have workload profiles

Create an environment without workload profiles enabled.

az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup --location eastus2 --enable-workload-profiles falseIdentify
-nName of the Container Apps environment.
-gName of resource group.
--locationLocation of resource.
--enable-workload-profilesBoolean indicating if the environment is enabled to have workload profiles

Options

2 in the Azure CLI reference
--enable-workload-profiles, -wBoolean indicating if the environment is enabled to have workload profiles
--zone-redundant, -zEnable zone redundancy on the environment.