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
Examples
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 profilesCreate 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 profilesOptions
--enable-workload-profiles, -wBoolean indicating if the environment is enabled to have workload profiles--zone-redundant, -zEnable zone redundancy on the environment.