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
instanceAccessGroups(
sort: GroupsSort
cursor: Cursor
): GroupsPage
alphaInstanceOncall: Map
formats: [String!]!
payload: Map
attributes: Map!
effectiveAttributes: 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.
Also null when you cannot view the project that contains the instance. You can see a
resource from another project through a grant, a resource:view policy, or a
dependency of an instance you can view; the instance that produced it stays hidden.
Resource.instanceAccessGroupsย โย GroupsPage object {#instance-access-groups}โ
The groups whose members can view instance.
Null for imported resources. You can read this field even when you cannot view the
project that contains the instance. When instance is null for you, ask a member of one
of these groups for access.
Resource.instanceAccessGroups.sortย โย GroupsSort input {#resource-instance-access-groups-sort}โ
Sort field and direction. Defaults to name ascending.
Resource.instanceAccessGroups.cursorย โย Cursor input {#resource-instance-access-groups-cursor}โ
Pagination cursor returned from a previous response to fetch the next page.
Resource.alphaInstanceOncallย โย Map scalar {#alpha-instance-oncall}โ
Alpha: this API can change or be removed at any time, without notice.
The people on call for the environment that contains the instance that produced this resource. The value is
that environment's md/v1/oncall stash entry, in the shape of the environment.oncall widget in
alphaWidgetCatalog: an optional title and a list of entries, each with an optional name, image_url,
email, and handles.
Null for imported resources and when the environment has no current on-call list. Anyone with
resource:view on this resource can read this field, even without access to the project that contains the
instance, so they know whom to contact.
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.attributesย โย Map! non-null scalar {#attributes}โ
Key-value attributes assigned directly to this resource, used by ABAC
policies. Reserved keys starting with md- are auto-injected by the system
and excluded from this map โ see effectiveAttributes for the merged view.
Resource.effectiveAttributesย โย Map! non-null scalar {#effective-attributes}โ
The full set of attributes that ABAC policy evaluation sees for this
resource โ its own attributes plus user attributes cascaded from the
instance chain (project, environment, component, instance) and the
resource type, plus auto-injected md-* system attributes.
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