Containers
Azure Container Apps Sandboxes
Run code in isolated sandboxes that can pause and resume with their state preserved. A sandbox group is the Azure resource you provision to manage those sandboxes.
Naming rules
- Abbreviation
- Length
- 1–32
- Allowed characters
- Letters, numbers, and hyphens. Start with a letter or number.
- Uniqueness scope
- resource group
Directory abbreviation
Code examples
These examples create a sandbox group linked to an existing Container Apps environment. Once linked, the environment cannot be changed or removed. Create individual sandboxes through the SDK or CLI.
Terraform
Terraform documentationterraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2.0"
}
}
}
variable "name" {
type = string
}
variable "resource_group_id" {
type = string
}
variable "location" {
description = "Azure region of the existing Container Apps environment."
type = string
}
variable "environment_id" {
type = string
}
resource "azapi_resource" "sandbox_group" {
type = "Microsoft.App/sandboxGroups@2026-07-01"
name = var.name
parent_id = var.resource_group_id
location = var.location
body = {
properties = {
environmentId = var.environment_id
}
}
}
Bicep
Bicep documentation@minLength(1)
@maxLength(32)
param name string
@description('Azure region of the existing Container Apps environment.')
param location string
param environmentId string
resource sandboxGroup 'Microsoft.App/sandboxGroups@2026-07-01' = {
name: name
location: location
properties: {
environmentId: environmentId
}
}
ARM template
ARM template documentation{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.47.16.16243",
"templateHash": "15779841807540441860"
}
},
"parameters": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 32
},
"location": {
"type": "string",
"metadata": {
"description": "Azure region of the existing Container Apps environment."
}
},
"environmentId": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.App/sandboxGroups",
"apiVersion": "2026-07-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"environmentId": "[parameters('environmentId')]"
}
}
]
}Private endpoints
For private ingress, link the sandbox group to an Express Container Apps environment. The endpoint serves exposed ports on sandboxes in linked groups. Outbound VNet connections are configured separately.
Service networking guidanceConfigure the private endpoint on the related resource Microsoft.App/managedEnvironments.
Choose the group ID for the connection you need. Available groups and DNS records depend on the cloud, region, SKU, and enabled features.
Azure public cloud
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward