What You’ll Build
Ajsonstore provider with a config resource that:
- Creates JSON configuration files
- Updates file contents when configuration changes
- Deletes files on resource removal
- Reports whether its file exists and what it holds
- Exposes file path and content hash as outputs
Prerequisites
Before starting, ensure you have:- Python 3.13+ installed
- uv package manager (install instructions)
- Pragmatiks CLI authenticated (
pragma auth login)
Step 1: Initialize the Project
Create a new provider project using the CLI:--defaults. It opens and closes with:
Step 2: Define the Resource
Replace the example resource with your JSON config resource. Opensrc/jsonstore_provider/resources/example.py and replace the contents:
Step 3: Register the Resource
Updatesrc/jsonstore_provider/resources/__init__.py to export your resource:
src/jsonstore_provider/__init__.py to register the resource with the provider:
Step 4: Publish and Install the Provider
Publish a version of your provider, then install it in your organization:publish builds the wheel with uv build, extracts the resource schemas, and uploads both as <org>/jsonstore version 0.1.0, where <org> is your organization’s slug. Published versions are immutable, so bump version in pyproject.toml before publishing again. install queues the provider for your organization, and the platform deploys it. Check the deployment with:
Step 5: Create a Resource
Now users can create resources using your provider. Create a filemy-config.yaml:
Summary
You’ve built a complete provider that:- Defines Config and Outputs schemas with validation
- Implements idempotent lifecycle methods (create, observe, update, delete)
- Publishes to the platform with
pragma providers publishand installs withpragma providers install
Next Steps
Config and Outputs
Design schemas with validation, defaults, and dependencies.
Lifecycle Methods
Deep dive into handlers, subresources, and idempotency.
CLI Reference
Full reference for init, publish, install, and deploy commands.