Skip to main content

Resource and Bundle Events

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

Resource​

A deployment provisions a resource, or a person or service account imports one.

Event typeOccurs when
resource.provisionedA deployment created a resource, or replaced the resource that it created before.
resource.importedA resource was imported into the organization.
resource.updatedThe fields of a resource changed.
resource.deletedA resource was deleted.
resource.exportedThe data of a resource was exported from Massdriver.

data.entity​

FieldTypeValue
idUUIDThe ID of the resource.
namestringThe name of the resource.
fieldstring or nullThe name of the resource on the instance that provisioned it. null for an imported resource.
payloadmapThe data of the resource. Each value of a field that the resource type marks as sensitive is "[SENSITIVE]".
tagsmapThe tags of the resource.
attributesmapThe custom attributes set on the resource.
resource_type_idUUIDThe ID of the resource type.
instance_idUUID or nullThe ID of the instance that provisioned the resource. null for an imported resource.
deployment_idUUID or nullThe ID of the deployment that provisioned the resource. null for an imported resource.
organization_idUUIDThe ID of the organization.
created_at, updated_attime

data.metadata​

On resource.exported, contains_secrets is true when the export revealed a sensitive value.

data.attributes​

ResourceAttributes
Provisionedmd-project, md-environment, md-component, md-instance, md-repo, md-bundle, and the custom attributes of the instance. md-resource-type, such as aws-iam-role@1.0.0. md-id is <instance>.<field>, such as api-prod-database.writer.
ImportedThe custom attributes of the resource, md-resource-type, and md-id, the ID of the resource.

Example​

{
"type": "resource.exported",
"data": {
"entity": {
"id": "e2a4c6f8-1b3d-4f5a-8c7e-9d0b2a4c6e81",
"name": "writer",
"field": "writer",
"payload": {
"arn": "arn:aws:iam::123456789012:role/api-prod-database-writer",
"external_id": "[SENSITIVE]"
},
"tags": {},
"attributes": {},
"resource_type_id": "9b1d3f5a-7c2e-4a6b-8d0f-1e3c5a7b9d24",
"instance_id": "e4a7b2c9-15d3-4f86-a0b1-9c3e5d7f2a68",
"deployment_id": "5c1de0a7-92b4-4f1e-8d3a-6e27c9f0b815",
"organization_id": "5a2c8e4f-1b7d-4e3a-9c6f-8d0b2a4e6c17",
"created_at": "2026-11-19T15:04:11Z",
"updated_at": "2026-11-19T15:04:11Z"
},
"actor": {
"account_id": "8d2f4c61-7a0e-4b9d-9c53-1f6a2e8b4d07",
"name": "Jane Doe",
"organization_id": "5a2c8e4f-1b7d-4e3a-9c6f-8d0b2a4e6c17"
},
"metadata": { "credential": "access_token", "access_token_id": "6f0e2d4c-8a1b-4c3d-9e5f-7a2b4c6d8e01", "contains_secrets": true },
"attributes": {
"md-id": "api-prod-database.writer",
"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",
"md-resource-type": "aws-iam-role@1.0.0"
}
}
}

Example conditions​

To sendEventsCondition
Exports that reveal a secretresource.exported.data.metadata.contains_secrets == true
Exports of every version of one resource typeresource.exported.data.attributes["md-resource-type"] // "" \| startswith("aws-iam-role@")
Imported resources onlyresource.*.data.entity.instance_id == null
Resources with an ARN in one AWS accountresource.provisioned.data.entity.payload.arn // "" \| contains(":123456789012:")

Resource type​

A resource type is the JSON schema of a kind of resource.

Event typeOccurs when
resource_type.publishedA version of a resource type was published.
resource_type.deletedA resource type was deleted.

data.entity​

FieldTypeValue
idUUIDThe ID of this version of the resource type.
identifierstringThe name of the resource type, such as aws-iam-role.
labelstring or nullThe display name of the resource type.
versionstringThe version, such as 1.0.0.
version_major, version_minor, version_patchintegerThe parts of version.
version_pre_releasestring or nullThe pre-release part of version, such as dev.20261119T150411Z.
schemamapThe JSON schema of the resource type.
organization_idUUIDThe ID of the organization.
repo_idUUID or nullThe ID of the repository of the resource type.
created_at, updated_attime

data.attributes​

md-id, the identifier of the resource type.

Example conditions​

To sendEventsCondition
New major versionsresource_type.published.data.entity.version_minor == 0 and .data.entity.version_patch == 0 and .data.entity.version_pre_release == null
Released versions only, not development versionsresource_type.published.data.entity.version_pre_release == null

Repo​

A repo is a bundle or resource type repository in the organization's catalog. It holds the versions of one bundle.

Event typeOccurs when
repo.createdA repo was added to the catalog.
repo.updatedThe settings of a repo changed.
repo.publishedA new bundle version was published to a repo.
repo.deletedA repo and its bundle versions were deleted.

data.entity​

FieldTypeValue
idUUIDThe ID of the repo.
namestringThe name of the repo, such as aws-rds-postgres.
artifact_typestringapplication/vnd.massdriver.bundle.v1+json for a bundle, or application/vnd.massdriver.resource-type.v1+json for a resource type.
readmestring or nullThe README of the repo.
changelogstring or nullThe changelog of the repo.
attributesmapThe custom attributes set on the repo.
organization_idUUIDThe ID of the organization.
created_at, updated_attime

data.attributes​

md-repo, md-repo-artifact-type (bundle or resource-type), the custom attributes of the repo, and md-id, the name of the repo.

Example conditions​

To sendEventsCondition
Bundle repos onlyrepo.*.data.attributes["md-repo-artifact-type"] == "bundle"
New versions of every AWS bundlerepo.published.data.entity.name \| startswith("aws-")
New versions that a CI service account publishedrepo.published.data.metadata.credential == "service_account"