YAML for Create new sandbox

Create a new sandbox with specified configuration.

YAML parameters for Create new sandbox

PARAMETERS
fromrequiredstring enum
The source type for creating the sandbox
Allowed enum:
SCRATCH,
SANDBOX,
SNAPSHOT
specrequiredobject
The sandbox specification containing configuration details
typerequiredstring

Value: SANDBOX_CREATE

actionrequiredstring
Unique identifier for the action within the pipeline.
sandbox_identifierstring
The identifier of the source sandbox (when creating from another sandbox)
update_if_existsboolean
Whether to update the sandbox configuration if a sandbox with the same identifier already exists in the project. If true and a sandbox exists, it will be reconfigured with the new specification instead of creating a new one
startboolean
Whether to start the sandbox after creation
tagsstring[]
The set of tags for the sandbox
snapshot_namestring
The name of the snapshot
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_SUCCESS,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
Defines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.
run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Apr 27, 2026

YAML examples for Create new sandbox

Create a sandbox environment

yaml
- action: "Create Sandbox" type: "SANDBOX_CREATE" from: SCRATCH sandbox_identifier: "my-sandbox-$BUDDY_EXECUTION_ID" update_if_exists: true start: true spec: name: "My Sandbox" distribution: "UBUNTU_20_04" resources: "2x4" applications: - type: "CUSTOM" name: "my-app" port: 3000 start_command: "npm start"

Create a sandbox from snapshot

yaml
- action: "Create Sandbox from Snapshot" type: "SANDBOX_CREATE" from: SNAPSHOT sandbox_identifier: "restored-sandbox" snapshot_name: "my-snapshot" start: true

Create a sandbox from existing sandbox

yaml
- action: "Clone Sandbox" type: "SANDBOX_CREATE" from: SANDBOX sandbox_identifier: "cloned-sandbox" start: false

Create new sandbox from Scratch (Nginx)

yaml
- action: "Create new Sandbox from Scratch" type: "SANDBOX_CREATE" from: SCRATCH spec: sandbox: create-sb name: create new sandbox os: ubuntu:24.04 first_boot_commands: |- apt get install apt-get install -y nginx apps: - nginx app_dir: /var/www/html endpoints: - www: 80

Create new sandbox from Scratch (Node.js)

yaml
- action: "Create new Sandbox from Scratch node" type: "SANDBOX_CREATE" from: SCRATCH update_if_exists: true spec: sandbox: create-sb-node name: create new Sandbox node os: ubuntu:22.04 first_boot_commands: |- apt-get update apt-get install curl -y curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - apt-get install -y nodejs apps: - node server.js app_dir: /var/www/myapp endpoints: - www: 80

Create new sandbox from Snapshot with spec

yaml
- action: "Create new Sandbox from snapshot" type: "SANDBOX_CREATE" from: SNAPSHOT snapshot_name: site-snapshot spec: sandbox: create-sb name: create sb os: ubuntu:24.04 resources: 4x8 first_boot_commands: |- apt get install apt-get install -y nginx tags: - background-blue - background-red - backend-app apps: - nginx app_dir: /var/www/html endpoints: - www: 80