Skip to main content

Module resource

Module resource 

Source
Expand description

The generic catalog-resource integration: declare a config + output fields + a provider prefix, and get ProviderOps (provision/observe/destroy) for free.

This is the default shape for any provider whose credentials come back as several flat env vars (Cloudflare R2/KV/D1/Workers/…). Stripe names them {RESOURCE}_{SUFFIX} (when several resources share an environment) or {PROVIDER}_{SUFFIX} (when unambiguous); the shared resolution handles both. Providers with a single bespoke credential blob (Clerk) stay custom.

Structs§

ResourcePayload
The checkpoint payload for any catalog resource: the Stripe resource name (for observe/destroy) and the ${integrations.<name>.<output>} map.

Traits§

CatalogResource
A catalog resource: a typed config + the credential fields it exposes. The ProviderOps lifecycle is derived (blanket impl below), so a new resource is just this trait + a Hostable + one registry row.

Functions§

bool_optional
Read an optional boolean field from the effective config.
bool_required
Read a required boolean field from the effective config.
destroy_resource
Remove a recorded resource from Stripe Projects.
int_optional
Read an optional integer field from the effective config.
int_required
Read a required integer field (e.g. a port) from the effective config.
integration_config
The integration’s effective config. Resource integrations are Managed (GlobalOnly), so there are no per-host override blocks to strip.
interp_optional
Read an optional string field and interpolate it when present.
interp_required
Read a required string field and interpolate ${...} references.
observe_resource
Re-check a recorded resource against Stripe Projects.
provision_resource
Provision a resource: build config, add the catalog resource (validated + paid-confirmed by the catalog tier), resolve its declared output fields (shared dual-form resolution), and record them.