Skip to main content

Deployment and Instance Events

For the fields that every event has, refer to Event Reference.

Deployment​

A deployment provisions, plans, or decommissions one instance.

Event typeOccurs when
deployment.createdA deployment was created for an instance.
deployment.proposedA deployment was proposed for approval. It does not run until someone approves it.
deployment.approvedA proposed deployment was approved.
deployment.rejectedA proposed deployment was rejected. It does not run.
deployment.enqueuedThe deployment queue accepted the deployment. It waits for a runner.
deployment.startedA runner started the deployment.
deployment.completedThe deployment finished successfully.
deployment.failedThe deployment failed.
deployment.abortedThe deployment was stopped before it finished.

Massdriver records deployment.enqueued, deployment.started, deployment.completed, and deployment.failed on its own. These events have no data.actor, and their credential is system. To select deployments by who started them, use deployed_by_account_id, deployed_by_service_account_id, or deployed_by_name in data.entity.

data.entity​

FieldTypeValue
idUUIDThe ID of the deployment.
statusstringPROPOSED, APPROVED, REJECTED, PENDING, RUNNING, COMPLETED, FAILED, or ABORTED.
actionstringPROVISION, PLAN, or DECOMMISSION.
versionstringThe bundle version that the deployment uses, such as 1.4.2.
messagestring or nullThe message that the person or service account gave the deployment.
tagsmapThe tags of the deployment.
deployed_by_namestringThe name of the person or service account that started the deployment.
deployed_by_account_idUUID or nullThe person that started the deployment.
deployed_by_service_account_idUUID or nullThe service account that started the deployment.
instance_idUUIDThe ID of the instance.
bundle_idUUIDThe ID of the bundle version.
rollback_of_deployment_idUUID or nullThe deployment that this deployment rolls back. null when it is not a rollback.
last_transitioned_attime or nullWhen status last changed.
logs_compacted_attime or nullWhen Massdriver compacted the logs of the deployment.
created_at, updated_attimeWith microseconds.

The event does not include the parameters of the deployment.

data.metadata​

deployment_action: the same value as data.entity.action.

data.attributes​

md-project, md-environment, md-component, md-instance, md-repo, md-bundle, the custom attributes of the instance, and md-id, the ID of the deployment.

Example​

{
"type": "deployment.failed",
"data": {
"entity": {
"id": "5c1de0a7-92b4-4f1e-8d3a-6e27c9f0b815",
"status": "FAILED",
"action": "PROVISION",
"version": "1.4.2",
"message": "Bump the instance size",
"tags": {},
"deployed_by_name": "github-actions",
"deployed_by_account_id": null,
"deployed_by_service_account_id": "c3e9a7b2-5d1f-4a8e-b6c0-9f2d4e7a1b85",
"instance_id": "e4a7b2c9-15d3-4f86-a0b1-9c3e5d7f2a68",
"bundle_id": "3f9a6c1e-8b2d-4e7a-b5c4-0d1e2f3a4b5c",
"rollback_of_deployment_id": null,
"last_transitioned_at": "2026-11-19T15:04:11Z",
"logs_compacted_at": null,
"created_at": "2026-11-19T14:58:02.104371Z",
"updated_at": "2026-11-19T15:04:11.471205Z"
},
"metadata": { "credential": "system", "deployment_action": "PROVISION" },
"attributes": {
"md-id": "5c1de0a7-92b4-4f1e-8d3a-6e27c9f0b815",
"md-project": "api",
"md-environment": "prod",
"md-component": "database",
"md-instance": "api-prod-database",
"md-repo": "aws-rds-postgres",
"md-bundle": "aws-rds-postgres@1.4.2"
}
}
}

Example conditions​

To sendEventsCondition
Deployments that a service account starteddeployment.completed, deployment.failed.data.entity.deployed_by_service_account_id != null
Decommissions onlydeployment.completed.data.entity.action == "DECOMMISSION"
Rollbacks onlydeployment.created.data.entity.rollback_of_deployment_id != null
Deployments that are not plansdeployment.*.data.metadata.deployment_action != "PLAN"
Deployments of a major version 2 bundledeployment.completed.data.entity.version \| startswith("2.")
Deployments with a message that names a ticketdeployment.created.data.entity.message // "" \| test("JIRA-[0-9]+")

Instance​

An instance is a component in one environment.

Event typeOccurs when
instance.createdAn instance was created: its component was added to an environment, or an environment was created or forked.
instance.updatedThe version or release strategy of an instance changed.
instance.deletedAn instance was deleted.
instance.orphanedAn instance was orphaned with orphanInstance.
instance.movedAn instance moved to an environment in another project.

data.entity​

FieldTypeValue
idUUIDThe ID of the instance.
identifierstringThe identifier of the instance, such as api-prod-database.
statusstringINITIALIZED, PROVISIONED, DECOMMISSIONED, or FAILED.
versionstringThe version constraint of the instance, such as 1.2.3 or ~1.2.
release_strategystringstable, or development when the instance uses development versions.
paramsmap or nullThe parameters of the instance.
name_prefixstring or nullThe name prefix that the organization's naming convention gave the instance.
tagsmapThe tags of the instance.
attributesmapThe custom attributes set on the instance.
component_idUUIDThe ID of the component.
environment_idUUIDThe ID of the environment.
bundle_idUUIDThe ID of the bundle version.
previous_identifierstringOnly on instance.moved: the identifier of the instance before the move.
created_at, updated_attime

data.attributes​

md-project, md-environment, md-component, md-instance, md-repo, md-bundle, the custom attributes of the instance, and md-id, the identifier of the instance.

Example​

{
"type": "instance.moved",
"data": {
"entity": {
"id": "e4a7b2c9-15d3-4f86-a0b1-9c3e5d7f2a68",
"identifier": "api-prod-database",
"previous_identifier": "web-prod-database",
"status": "PROVISIONED",
"version": "~1.4",
"release_strategy": "stable",
"params": { "instance_class": "db.r6g.large" },
"name_prefix": "api-prod-database",
"tags": {},
"attributes": {},
"component_id": "08c33afd-b40a-419b-8c32-5c976a90681e",
"environment_id": "2b7e4d1a-6c3f-4e8b-9a5d-0f1c2e3d4b6a",
"bundle_id": "3f9a6c1e-8b2d-4e7a-b5c4-0d1e2f3a4b5c",
"created_at": "2026-10-02T09:12:44Z",
"updated_at": "2026-11-19T15:04:11Z"
},
"metadata": { "credential": "session" },
"attributes": {
"md-id": "api-prod-database",
"md-project": "api",
"md-environment": "prod",
"md-component": "database",
"md-instance": "api-prod-database",
"md-repo": "aws-rds-postgres",
"md-bundle": "aws-rds-postgres@1.4.2"
}
}
}

Example conditions​

To sendEventsCondition
Instances that change to development versionsinstance.updated.data.entity.release_strategy == "development"
Instances that use a pinned versioninstance.updated.data.entity.version \| test("^[0-9]+\\.[0-9]+\\.[0-9]+$")
Instances that leave one projectinstance.moved.data.entity.previous_identifier \| startswith("web-")

Connection​

A connection fills a dependency of an instance with a resource of another instance, because of a link on the project blueprint.

Event typeOccurs when
connection.createdA link started to fill a dependency of an instance.
connection.deletedA link stopped filling a dependency of an instance.

data.entity​

FieldTypeValue
idUUIDThe ID of the connection.
to_fieldstringThe name of the dependency on the instance.
to_instance_idUUIDThe ID of the instance that has the dependency.
resource_idUUIDThe ID of the resource that fills the dependency.
link_idUUID or nullThe ID of the link.
created_at, updated_attime

Connection events have no attributes and no actor.

Example conditions​

To sendEventsCondition
Changes to one dependency of one instanceconnection.*.data.entity.to_instance_id == "e4a7b2c9-15d3-4f86-a0b1-9c3e5d7f2a68" and .data.entity.to_field == "database"

Remote reference​

A remote reference fills a dependency of an instance with a resource that you choose.

Event typeOccurs when
remote_reference.assignedA resource was set on a dependency of an instance.
remote_reference.unsetThe resource was removed from the dependency.

data.entity​

FieldTypeValue
idUUIDThe ID of the remote reference.
fieldstringThe name of the dependency on the instance.
instance_idUUIDThe ID of the instance.
resource_idUUIDThe ID of the resource.
created_at, updated_attime

Remote reference events have no attributes.

Example conditions​

To sendEventsCondition
Changes to the network of every instanceremote_reference.*.data.entity.field == "network"