Define a class inheriting from pulumi.dynamic.ResourceProvider and implement the create, read, update, and delete methods that call your external API using an HTTP client
In create, call the API to provision the resource and return a CreateResult with the resource id and a dict of output properties
In diff, compare old and new inputs and return a DiffResult indicating which properties require replacement versus in-place update
Define a Resource class inheriting from pulumi.dynamic.Resource that accepts inputs as a typed Input object and passes the provider instance to the parent constructor
Instantiate the resource in a Pulumi program and run 'pulumi up' to verify the custom provider lifecycle hooks are called correctly
Known gotchas
Dynamic provider state is stored as-is in the Pulumi state file; all output properties returned by create must be JSON-serializable primitive types or dicts/lists of primitives
The read method is called during refresh and must return current live state; returning stale inputs without actually querying the API causes 'pulumi refresh' to mask drift
Dynamic providers execute in the language runtime of the Pulumi program, not in a separate plugin process; dependencies (e.g., the HTTP client library) must be installed in the same environment as the Pulumi program
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp