pulumi-purifier full guide

Detailed setup, dependency management, build commands, and troubleshooting. Start with the overview for the initial commands; use the sections below for the complete setup and behavior. pulumi-purifier is classified at maturity tier 4 (see tier assessment for details).

Contents

Setup and activation

Run Pulumi with locked, Nix-resolved provider and language plugins.

From an existing Pulumi YAML project:

Use the overview’s Quickstart for the initial command sequence. The setup details below apply to that workflow.

Commit pulumi-purifier.lock.json. The native Pulumi language host discovers the project’s required plugins. Locking captures their exact versions, archive URLs, and hashes for Linux x86-64 and ARM64. Nix verifies the archives and replays Pulumi’s native plugin installer before writing the lock.

Version compatibility

Tool or language Packaged defaults Tested versions
Pulumi 3.268.0 —

Operating systems and architectures

OS CPU architecture Packaged toolchain Recorded workflow
Linux ARM64 Yes Not recorded
Linux x86-64 Yes Tested

Development loop

Edit resource properties and use Pulumi normally:

pulumi preview
pulumi up
pulumi stack output

Cloud API access retains its ordinary behavior. After changing plugin selections:

pulumi-purifier lock --update
pulumi-purifier prefetch

Using locked dependencies

This integration requires the pulumi wrapper. It supplies immutable plugin files through private writable plugin directories, preserving your existing Pulumi credentials, backend selection, and global plugin cache. Without a lockfile it warns and runs ordinary, impure Pulumi. Install it through your usual installation method if you want it beyond nix shell.

The wrapper compares plugin selections through the native language host rather than hashing the whole program. Plugin installation and removal are guarded in the native SDK, including native child commands. Use the lock command to update them. Private aliases and Nix GC roots live beneath $XDG_CACHE_HOME/pulumi-purifier.

Use --project and --lock for explicit locations, or set PULUMI_PURIFIER_PROJECT and PULUMI_PURIFIER_LOCK. The native wrapper also honors Pulumi’s --cwd option.

Nix builds

The overlay exposes buildPulumiProject with src, doCheck, and checkCommand. It verifies native plugin discovery and prepares a source tree with plugins in .pulumi-purifier/plugins. It exposes packages, tests, release, and fetches; output names are known without import-from-derivation.

Project projections

This integration provides native release artifacts, rather than a typed cross-purifier project projection interface. The publication workflow below uses those native artifacts.

pulumi-purifier bundle creates project.tar.gz containing the project sources and native plugin tree. It contains no deployment state or credentials generated by the purifier. To use an extracted bundle with an ordinary Pulumi CLI, copy its plugin tree into a private writable Pulumi home:

mkdir -p .consumer-pulumi/plugins
cp -r .pulumi-purifier/plugins/. .consumer-pulumi/plugins/
chmod -R u+w .consumer-pulumi
export PULUMI_HOME="$PWD/.consumer-pulumi"
pulumi preview

Authenticate or select your backend in that private home as appropriate. publish --tag TAG uploads the exact source archive to an existing GitHub release.

Supported scope

Scope

The initial provider supports Pulumi YAML projects and binary plugins from public HTTPS archives on Linux x86-64 and ARM64. Source-based plugins and other language runtimes need their language dependency providers. Tests use Pulumi’s local state backend and the real Random provider; they do not create cloud resources.

Target systems

  • x86_64-linux
  • aarch64-linux

Platform limitations and validation

  • Native Linux x86-64 and ARM64 are targeted. The fixture uses a local state backend and the Random provider; it does not create cloud resources.