runner.environment-deletion-ec2-vm ​
Delete the raw EC2 VM environment for a runner group
Tear down a raw EC2 VM runner environment.
Layers:
- load — read cached environment state
- guard — refuse while executions are live (config.force_delete bypasses)
- launch_template — delete the instance-shape launch template
- iam — delete the instance profile (config.delete_iam_on_cleanup)
- log_group — delete the log group (config.delete_log_group_on_teardown)
- finalize — clear cached fields
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-runners-aws |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
runner_group_uuid | uuid | Yes | — | UUID of the RunnerGroup whose raw EC2 VM environment is being deleted, picked from the organization's list of runner groups. |
organization_uuid | uuid | Yes | — | UUID of the caller's organization, injected server-side from the authenticated request; scopes the operation to the correct tenant. |
workflow_run_id | string | No | — | — |
workflow_run_uuid | string | No | — | Internal engine correlation/run identifier stamped onto this DAG execution; not a user-facing entity reference and has no picker. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
runner_group_uuid | uuid | No | — | UUID of the RunnerGroup this workflow operates on, picked from the organization's list of runner groups. Optional on this shared passthrough schema because the same field also appears as an output-only echo. |
organization_uuid | uuid | No | — | UUID of the caller's organization, injected server-side from the authenticated request; scopes the operation to the correct tenant. |
registry_account_uuid | uuid | No | — | UUID of the container registry account this runner group resolves images against, picked from the organization's registry accounts. Optional — falls back to default/unauthenticated image resolution when absent. |
actor_uuid | uuid | No | — | UUID of the user or service actor who triggered this action, injected server-side from the authenticated request when available; used for audit/attribution only. |
workflow_run_id | string | No | — | — |
workflow_run_uuid | string | No | — | Legacy alias of workflow_run_id: an internal engine correlation/run identifier for this DAG execution (ADR-015/E1 plumbing), not a foreign key to any business entity. No list/query workflow applies — this is engine-generated, never user-supplied. |
workflow_uuid | string | No | — | Engine workflow-run identifier associated with this record; not a platform entity foreign key despite the name. No list/query workflow applies — this is engine-generated, never user-supplied. |
status | string | No | — | — |
outcome | string | No | — | — |
initiated_at | string | No | — | — |
completed_at | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
reason | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
failed_at_state | json | No | — | — |
compensation_trigger | json | No | — | — |
comp_current_layer | json | No | — | — |
comp_queue | json | No | — | — |
comp_retry_count | json | No | — | — |
primitive_input | json | No | — | — |
primitive_output | json | No | — | — |
load_ec2_vm_environment | json | No | — | — |
stop_active_executions_ec2_vm | json | No | — | — |
delete_ec2_vm_launch_template | json | No | — | — |
delete_ec2_vm_iam_instance_profile | json | No | — | — |
delete_ec2_vm_log_group | json | No | — | — |
finalize_ec2_vm_environment_deletion | json | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | load | runner.load_ec2_vm_environment | — |
| 2 | guard | runner.stop_active_executions_ec2_vm | — |
| 3 | launch_template | runner.delete_ec2_vm_launch_template | — |
| 4 | iam | runner.delete_ec2_vm_iam_instance_profile | — |
| 5 | log_group | runner.delete_ec2_vm_log_group | — |
| 6 | finalize | runner.finalize_ec2_vm_environment_deletion | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
runner.load_ec2_vm_environment | load_ec2_vm_environment |
runner.stop_active_executions_ec2_vm | stop_active_executions_ec2_vm |
runner.delete_ec2_vm_launch_template | delete_ec2_vm_launch_template |
runner.delete_ec2_vm_iam_instance_profile | delete_ec2_vm_iam_instance_profile |
runner.delete_ec2_vm_log_group | delete_ec2_vm_log_group |
runner.finalize_ec2_vm_environment_deletion | finalize_ec2_vm_environment_deletion |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "runner.environment-deletion-ec2-vm",
"initial_data": {
"runner_group_uuid": "value",
"organization_uuid": "value"
}
}