{"id":"a028d147-56df-4678-94a6-128c732e5552","task":"Write a Pulumi dynamic provider in Python to manage a custom API resource lifecycle with create, read, update, and delete operations","domain":"pulumi.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/a028d147-56df-4678-94a6-128c732e5552"}