Skip to main content

Project and Environment Events

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

Project​

Event typeOccurs when
project.createdA project was created.
project.updatedThe name or description of a project changed.
project.deletedA project was deleted.
project.clonedA project was cloned. The entity is the new project. Massdriver records no component or link events for the clone.

data.entity​

FieldTypeValue
idUUIDThe ID of the project.
identifierstringThe identifier of the project, such as api.
namestringThe name of the project.
descriptionstring or nullThe description of the project.
tagsmapThe tags of the project.
attributesmapThe custom attributes set on the project.
organization_idUUIDThe ID of the organization.
created_at, updated_attime

data.attributes​

md-project, the custom attributes of the project, and md-id, the identifier of the project.

Example conditions​

To sendEventsCondition
Projects that have no descriptionproject.created(.data.entity.description // "") == ""
Projects with a name that starts with sandbox-project.*.data.entity.name \| startswith("sandbox-")

Environment​

Event typeOccurs when
environment.createdAn environment was created in a project.
environment.updatedThe name, description, or settings of an environment changed.
environment.deletedAn environment was deleted.
environment.forkedAn environment was forked from a parent environment, or a fork was forked again to re-apply the parent's values. Each instance got its parent instance's params (except fields the bundle marks not copyable), version, and release strategy, and the parent's environment defaults, secrets, and remote references when the fork asked to copy them. A new fork also sends environment.created and instance.created for each instance.

data.entity​

FieldTypeValue
idUUIDThe ID of the environment.
identifierstringThe full identifier of the environment, such as api-prod.
namestringThe name of the environment.
descriptionstring or nullThe description of the environment.
decommission_protectionbooleantrue when Massdriver blocks decommissions in the environment.
separation_of_dutybooleantrue when the person or service account that proposes a deployment cannot approve it.
parent_environment_idUUID or nullThe ID of the environment that this environment was forked from. null when it is not a fork.
tagsmapThe tags of the environment.
attributesmapThe custom attributes set on the environment.
project_idUUIDThe ID of the project.
created_at, updated_attime
parent_environmentobjectOn environment.forked only. The parent environment, with the same fields.
copy_env_defaults, copy_secrets, copy_remote_referencesbooleanOn environment.forked only. Whether the fork copied the parent's environment defaults, secrets, and remote references.

data.attributes​

md-project, md-environment (the last part of the identifier, such as prod), the custom attributes of the environment, and md-id, the full identifier of the environment.

Example​

json
{
"type": "environment.created",
"data": {
"entity": {
"id": "2b7e4d1a-6c3f-4e8b-9a5d-0f1c2e3d4b6a",
"identifier": "api-pr42",
"name": "PR 42",
"description": null,
"decommission_protection": false,
"separation_of_duty": false,
"parent_environment_id": "7f3a1c9e-2d4b-4e6a-8c1f-5b0d3e7a9c24",
"tags": {},
"attributes": {},
"project_id": "1a9d6e3f-4b2c-4d7e-8f0a-6c5b3e2d1f90",
"created_at": "2026-11-19T15:04:11Z",
"updated_at": "2026-11-19T15:04:11Z"
},
"actor": {
"service_account_id": "c3e9a7b2-5d1f-4a8e-b6c0-9f2d4e7a1b85",
"name": "github-actions",
"organization_id": "5a2c8e4f-1b7d-4e3a-9c6f-8d0b2a4e6c17"
},
"metadata": { "credential": "service_account" },
"attributes": { "md-id": "api-pr42", "md-project": "api", "md-environment": "pr42" }
}
}

Example conditions​

To sendEventsCondition
Forked environments onlyenvironment.created.data.entity.parent_environment_id != null
Environments where decommission protection is offenvironment.updated.data.entity.decommission_protection == false
Preview environments that a person deletesenvironment.deleted(.data.attributes["md-environment"] \| startswith("pr")) and .data.actor.account_id != null

Environment default​

An environment default is a resource, such as a cloud credential or a network, that fills the dependencies of that resource type in every instance of an environment.

Event typeOccurs when
environment_default.createdA resource was set as an environment default.
environment_default.deletedA resource was removed from the defaults of an environment.

data.entity​

FieldTypeValue
idUUIDThe ID of the environment default.
environment_idUUIDThe ID of the environment.
resource_idUUIDThe ID of the resource.
resource_type_idUUIDThe ID of the resource type.
created_at, updated_attime

Environment default events have no attributes.

Example conditions​

To sendEventsCondition
Changes to the defaults of one environmentenvironment_default.*.data.entity.environment_id == "2b7e4d1a-6c3f-4e8b-9a5d-0f1c2e3d4b6a"

Component​

A component is a bundle on the project blueprint. Each environment of the project has one instance of the component.

Event typeOccurs when
component.createdA component was added to a project.
component.updatedThe name, position, bundle, or parameters of a component changed.
component.deletedA component was deleted, with its instances.

data.entity​

FieldTypeValue
idUUIDThe ID of the component.
identifierstringThe full identifier of the component, such as api-database.
namestringThe name of the component.
descriptionstring or nullThe description of the component.
suffixstringA random 4-character value that Massdriver adds to cloud resource names.
positionobject or nullThe position of the component on the blueprint: x and y.
tagsmapThe tags of the component.
attributesmapThe custom attributes set on the component.
project_idUUIDThe ID of the project.
repo_idUUIDThe ID of the bundle repository.
created_at, updated_attime

data.attributes​

md-project, md-component (the last part of the identifier, such as database), md-repo, the custom attributes of the component, and md-id, the full identifier of the component.

Example conditions​

To sendEventsCondition
Components of one bundlecomponent.created.data.attributes["md-repo"] == "aws-rds-postgres"
Components with no team attributecomponent.created.data.attributes.team == null

A link is a line between two components on the project blueprint. It connects a resource of one component to a dependency of the other.

Event typeOccurs when
link.createdA link was drawn.
link.deletedA link was removed.

data.entity​

FieldTypeValue
idUUIDThe ID of the link.
from_component_idUUIDThe ID of the component that has the resource.
from_fieldstringThe name of the resource on that component.
to_component_idUUIDThe ID of the component that has the dependency.
to_fieldstringThe name of the dependency on that component.
from_version_constraintstring or nullThe versions of the source bundle that the link works with.
to_version_constraintstring or nullThe versions of the destination bundle that the link works with.
created_at, updated_attime

Link events have no attributes.

Example conditions​

To sendEventsCondition
Links that change a network dependencylink.*.data.entity.to_field == "network"

Secret​

A secret is a value that you set on an instance. The event never includes the value.

Event typeOccurs when
secret.setA secret was set on an instance.
secret.unsetA secret was removed from an instance.

data.entity​

FieldTypeValue
idUUIDThe ID of the secret.
namestringThe name of the secret, such as DB_PASSWORD.
instance_idUUIDThe ID of the instance.
created_at, updated_attime

Secret events have no attributes. To select one instance, use instance_id.

Example conditions​

To sendEventsCondition
Changes to secrets with names that end in _PASSWORDsecret.*.data.entity.name \| endswith("_PASSWORD")
Secrets set with the CLI or a scriptsecret.set.data.metadata.credential == "access_token"

Stash entry​

A stash entry is a key and a value on a project, environment, component, instance, or deployment.

Event typeOccurs when
stash_entry.setA stash entry was set.
stash_entry.deletedA stash entry was deleted. An entry that expires sends no event.

data.entity​

FieldTypeValue
idUUIDThe ID of the entry.
keystringThe key, such as md/v1/health.
labelstring or nullThe label of the entry.
formatstringtext or json.
immutablebooleantrue when the key cannot be set again until the entry expires or is deleted.
sensitivebooleantrue when the value is encrypted.
expires_attime or nullWhen the entry expires. null when it has no TTL.
scopeobjectThe entity that holds the entry. kind is project, environment, component, instance, or deployment. id is its identifier, or its ID for a deployment.
valuestring or nullThe value. null when the entry is sensitive.
dataobject or nullThe value parsed as JSON, for a json entry. null when the entry is sensitive.
updated_attime

data.attributes​

The attributes of the entity that holds the entry. For a deployment's entry, the attributes of the deployment.

Example​

json
{
"type": "stash_entry.set",
"data": {
"entity": {
"id": "9e4c2a7b-1d3f-4b6e-8a0c-5f2d7b9e1c34",
"key": "md/v1/health",
"label": "Health",
"format": "text",
"immutable": false,
"sensitive": false,
"expires_at": "2026-11-24T06:54:03Z",
"updated_at": "2026-11-24T06:44:03Z",
"scope": { "kind": "instance", "id": "api-prod-database" },
"value": "degraded",
"data": null
},
"actor": {
"service_account_id": "c3e9a7b2-5d1f-4a8e-b6c0-9f2d4e7a1b85",
"name": "stash-sync",
"organization_id": "5a2c8e4f-1b7d-4e3a-9c6f-8d0b2a4e6c17"
},
"metadata": { "credential": "service_account" },
"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
Health changes to downstash_entry.set.data.entity.key == "md/v1/health" and .data.entity.value == "down"
Banners in productionstash_entry.set.data.entity.key == "md/v1/banner" and .data.attributes["md-environment"] == "prod"
Entries deleted by a personstash_entry.deleted.data.actor.account_id != null