DEV Community

Cover image for Storing Pulumi State on IPFS with Filebase
K for Fullstack Frontend

Posted on

Storing Pulumi State on IPFS with Filebase

I played around with my favourite infrastructure tool Pulumi and asked myself if I could use IPFS as storage backend the deployment state of my projects.

Pulumi is open source and allows to self-host your storage backend. Could be interesting to have your state publicly available on IPFS, and since the state doesn't include the deployment credentials it wouldn't leak anything critical.

Filebase is a file hosting provider which offers a Amazon S3 compatible API to store files that are then pinned to IPFS. Since Pulumi comes out-of-the-box with a S3 connector, I gave it a try.


A Filebase account. It comes with a free tier that doesn't require a credit card.

A Node.js installation.


First, we create a S3 bucket on Filebase. Hop on the Filebase Console, click on "Create Bucket", name it "deployments", chose IPFS, and hit "Create Bucket".

Next, get the Filebase credentials here. We will need them later.

Then install Pulumi:

$ curl -fsSL | sh
Enter fullscreen mode Exit fullscreen mode

This might require a restart of the terminal so the pulumi command works.

And finally logging into the Filebase S3 bucket with Pulumi, but replace the keys.

$ export AWS_REGION='us-east-1' && \
  pulumi login 's3://deployments?'
Enter fullscreen mode Exit fullscreen mode

Aaaand we're good to go.

Testing Everything

Let's create a Pulumi project. This will automatically upload a empty state to Filebase.

$ mkdir my-project && cd my-project
$ pulumi new aws-typescript
Enter fullscreen mode Exit fullscreen mode

After this, we can find the state in dev.json in the bucket we created here. This page will also show the "IPFS Gateway URL" with the CID of our file, so we can open it in the browser.

Top comments (0)