Resource
A cloud credential, database connection string, network configuration, or other infrastructure output produced by (or imported into) Massdriver.
Resources are the connective tissue between instances. When an instance is deployed, it produces resources as outputs. Other instances can consume those resources as inputs, creating a dependency graph of your infrastructure.
Resources have two origins:
- Imported — created directly through the API (e.g., uploading existing AWS credentials). You have full CRUD control over these resources.
- Provisioned — created automatically when an instance is deployed. These are read-only and managed entirely by the owning instance's lifecycle.
type Resource {
id: ID!
name: String!
type: String
origin: ResourceOrigin!
resourceType: ResourceType
field: String
instance: Instance
formats: [String!]!
payload: Map
createdAt: DateTime!
updatedAt: DateTime!
connections(
cursor: Cursor
): ConnectionsPage
environmentDefaults(
cursor: Cursor
): EnvironmentDefaultsPage
remoteReferences(
cursor: Cursor
): RemoteReferencesPage
grants(
cursor: Cursor
): GrantsPage
}
Fields
Resource.id ● ID! non-null scalar {#id}
Unique identifier for this resource.
Resource.name ● String! non-null scalar {#name}
Human-readable display name for this resource.
Resource.type ● String scalar {#type}
The resource type identifier (e.g., aws-iam-role).
Deprecated: Use resourceType { id } instead for a richer representation
that includes the resource type's name and schema.
Resource.origin ● ResourceOrigin! non-null enum {#origin}
How this resource was created. Determines whether it can be modified through the API.
Resource.resourceType ● ResourceType object {#resource-type}
The resource type that this resource conforms to, defining its schema and validation rules.
Resource.field ● String scalar {#field}
The bundle output handle that produced this resource (e.g., authentication, database).
Set only for provisioned resources — it corresponds to a field declared under
artifacts in the producing bundle's massdriver.yaml. Null for imported resources.
Resource.instance ● Instance object {#instance}
The instance whose deployment produced this resource.
Null for imported resources. For provisioned resources, this is the instance that owns the resource's lifecycle — updating or decommissioning the instance will update or remove the resource.
Resource.formats ● [String!]! non-null scalar {#formats}
Download formats supported for this resource.
Always includes json (the raw payload). Additional formats come from the resource
type's $md.export declarations, which can render the payload as YAML or other
templated outputs. Pass a returned format to downloadArtifact to retrieve the
rendered content.
Resource.payload ● Map scalar {#payload}
The resource's structured payload. Fields marked $md.sensitive in the resource type's
schema are masked as [SENSITIVE]. Use exportResource to retrieve an unmasked copy —
that operation is recorded in the audit log.
Resource.createdAt ● DateTime! non-null scalar {#created-at}
When this resource was created (UTC).
Resource.updatedAt ● DateTime! non-null scalar {#updated-at}
When this resource was last modified (UTC).
Resource.connections ● ConnectionsPage object {#connections}
Connections that consume this resource — runtime wirings into a sibling instance via a blueprint Link. Filtered to consumers in projects you can view.
Resource.connections.cursor ● Cursor input {#resource-connections-cursor}
Cursor from a previous page to fetch the next set of results.
Resource.environmentDefaults ● EnvironmentDefaultsPage object {#environment-defaults}
Environments that have set this resource as the default for its resource type. Filtered to environments in projects you can view.
Resource.environmentDefaults.cursor ● Cursor input {#resource-environment-defaults-cursor}
Cursor from a previous page to fetch the next set of results.
Resource.remoteReferences ● RemoteReferencesPage object {#remote-references}
Per-instance connection-slot overrides that point at this resource. Filtered to instances in projects you can view.
Resource.remoteReferences.cursor ● Cursor input {#resource-remote-references-cursor}
Cursor from a previous page to fetch the next set of results.
Resource.grants ● GrantsPage object {#grants}
Grants the publisher has authored on this resource — what it is shared as, and which recipient projects / environments qualify. If you can see this resource you can see all of its grants; grants are publisher-side metadata, not visibility-gated themselves.
Resource.grants.cursor ● Cursor input {#resource-grants-cursor}
Cursor from a previous page to fetch the next set of results.
Returned By
resource query
Member Of
InstanceDependency object ● InstanceResource object ● RemoteReference object ● ResourcePayload object ● ResourcesPage object
Implemented By
GrantSource union