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

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair opslevel and pulumi to track service ownership while building cloud resources with code. This setup keeps your service catalog fresh every time a deployment run finishes. OpsLevel tracks who owns each app, what tier it is in, and its health score. Pulumi lets engineers define cloud resources and service rules in standard programming languages. When you link them, code changes update both your cloud servers and your catalog records. Nobody has to update a spreadsheet or click around a

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 pair opslevel and pulumi to track service ownership while building cloud resources with code. This setup keeps your service catalog fresh every time a deployment run finishes.

OpsLevel tracks who owns each app, what tier it is in, and its health score. Pulumi lets engineers define cloud resources and service rules in standard programming languages. When you link them, code changes update both your cloud servers and your catalog records. Nobody has to update a spreadsheet or click around a web form after a deploy.

How opslevel and pulumi share data and roles

To make opslevel and pulumi work together, you use the official provider plugin during runs. Pulumi reads your code and sends requests to the OpsLevel API over the network. This flow creates or updates services, teams, checks, and rubrics in your catalog. You can also read existing catalog data into your deployment plans to tag cloud servers.

For identity and permissions, the deployment runner needs an API token from OpsLevel. Meanwhile, Pulumi needs cloud credentials and access to its own state backend. In a good setup, the runner logs in with scoped tokens tied to a specific team. As the deployment runs, Pulumi checks the state file and compares it to the catalog. Then it writes only the needed changes to both the cloud provider and OpsLevel.

Data flows in both directions during a build. First, the build tool pulls team names and service tiers from the catalog. Next, it tags new cloud databases or compute instances with those exact owner details. Last, it pushes the new resource links back to the service page in OpsLevel.

Common failure modes and how to scope permissions

The biggest risk with this setup is using one shared admin token for all runs. If every build uses the same broad OpsLevel token, any repo can overwrite any service. A mistake in one small app could delete catalog records for a core payment service. Shared cloud keys in Pulumi state files create the same wide blast radius.

Another common issue is unlogged changes made from local laptops. When engineers run updates from their own machines, you lose track of who changed what. Local runs also force you to hand out static API keys to every developer. If a laptop gets lost, someone could use those keys to read or alter records.

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, move all runs into automated build pipelines and lock down network paths. Give each pipeline a narrow role that can only touch its own team resources. Store API tokens in a secure secret store and rotate them on a regular schedule. Set up your state backend so developers can read plans without holding write keys.

Keeping catalog state in sync across teams

Drift happens when someone edits a service in the web UI instead of the code. The next time the pipeline runs, it will overwrite those manual edits. Teams should agree on which fields belong to code and which stay in the UI. Keep core facts like repo links, owner teams, and tiers in your Pulumi files.

You should also test catalog changes in pull requests before merging them to the main branch. Run a preview step on every pull request to see what catalog records will change. This step catches typos in team names or broken rubric rules before they break production. When the team merges the code, the pipeline applies the update and logs the event.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How does Pulumi talk to OpsLevel during a deployment?

Pulumi uses an official provider plugin that calls the OpsLevel API over HTTPS. It sends updates using an API token that you pass to the build runner.

What happens if someone edits an OpsLevel service in the browser?

The next Pulumi run will spot the drift and reset the field to match code. Keep ownership facts in code so your catalog stays accurate over time.

Where should we store the API tokens for these runs?

Keep tokens in your pipeline secret store and never commit them to git repos. Rotate the keys often and limit each token to the lowest needed role.

The query runs. The emails stay hidden.