The Simplest Way to Make Linstor and Pulumi Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use linstor and pulumi to set up block storage with code. Pulumi defines the storage pools, and Linstor manages the Linux volumes on your nodes. This setup lets engineers create and resize fast disks during normal app runs. You do not need to run storage commands by hand on each server. Instead, your team tracks every storage change inside version control. How linstor and pulumi share data and roles Linstor runs a central controller that talks to storage nodes across your cluster. Pulum

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use linstor and pulumi to set up block storage with code. Pulumi defines the storage pools, and Linstor manages the Linux volumes on your nodes. This setup lets engineers create and resize fast disks during normal app runs. You do not need to run storage commands by hand on each server. Instead, your team tracks every storage change inside version control.

How linstor and pulumi share data and roles

Linstor runs a central controller that talks to storage nodes across your cluster. Pulumi runs your code and sends requests to this controller over the network. First, Pulumi reads your state file to check the current storage setup. Next, it logs in to the Linstor controller using a client key or cert. Then, the controller tells the node agents to create or remove DRBD volumes.

Data flows in both directions during each deployment run. Linstor sends back volume status, node health, and pool size details to Pulumi. Pulumi saves these details in its state store so future runs know what exists. If a disk fails to build, the controller returns an error to the runner. Your deployment stops right away so bad changes do not spread across the cluster.

Permissions between the two tools rely on clear role boundaries. The deployment runner needs permission to create resource groups and volume definitions. Still, it should not hold full admin rights over the underlying host system. Good teams set up a specific role just for automated deployment jobs. This role only touches the storage pools assigned to that specific app or team.

Common failure modes and how to scope roles

Many teams make the mistake of sharing one admin key across all projects. If a build server leaks that key, an attacker can wipe every storage pool. Broad keys also let one team break volumes owned by another team by mistake. Another common problem happens when engineers run local updates from their laptops. These manual runs bypass central logs and leave no trail of who changed what.

Unlogged storage changes make outages much harder to fix under pressure. When a volume drops offline, you need to know which run changed its size. If three people share the same login key, the controller logs show one name. You cannot tell which engineer or automated job triggered the bad storage update.

Pulumi Policy as Code + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give each deployment pipeline its own narrow role and key. Scope each role to a single Linstor resource group or storage pool. Next, lock down the network path between your build runners and the storage controller. Only allow traffic from known runner addresses to reach the controller port. Finally, store your state files in a backend that locks runs and tracks users.

Keeping storage state and real volumes in sync

Storage state can drift when admins fix disk issues by hand during an outage. If someone deletes a volume outside of code, the state file becomes wrong. The next automated run will fail or try to rebuild the missing disk. You should run regular refresh jobs to check real cluster data against saved state.

Teams also need clear rules for handling database volumes and stateful disks. Deleting a volume in code can destroy live user data such as emails or phone numbers. Always set protection flags on critical storage resources inside your deployment code. These flags stop the runner from dropping volumes unless a human approves the plan. Separate your stateful storage stacks from your stateless app stacks to reduce daily risk.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

How does Pulumi talk to the Linstor controller?

Pulumi sends requests to the Linstor controller API over a secure network port. It uses a client key or certificate to log in and run volume changes.

What happens if a storage node goes offline during a run?

The Linstor controller spots the dead node and reports an error back to Pulumi. Pulumi marks the update as failed and stops making further changes to that volume.

How can teams prevent accidental volume deletion in code?

Engineers can enable resource protection rules on stateful volumes within their deployment stacks. They can also split storage definitions into a separate stack with strict review rules.

The query runs. The emails stay hidden.