Running Pulumi?

Pulumi stack locked or state corrupted? We fix it.

Pulumi turns infrastructure into real code, which is great until the real code ends up with real bugs, a circular dependency between resources, or a state file that nobody can unlock. We take the stack that refuses to preview, work out what the program is actually trying to create, and leave a codebase your team can safely run on a Monday morning.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

pulumi-up.log

still failing

What it is

Pulumi at a glance

Pulumi is an infrastructure-as-code platform launched in 2018 that lets you declare cloud resources in TypeScript, Python, Go, .NET, Java or YAML rather than in a custom DSL. The programs produce a resource graph that a provider plugin applies against AWS, Azure, Google Cloud, Kubernetes and most other targets.

State can live in Pulumi Cloud (the hosted backend), in an S3 or Azure Blob bucket, or on local disk for small projects. Pulumi positions itself against Terraform by giving you loops, conditionals, abstractions and package management from the host language rather than HCL. The flipside is that infrastructure code written in TypeScript or Python is exactly as easy to overcomplicate as any other application code.

Type
Infrastructure as code with real programming languages
First released
2018
License
Apache 2.0 for the SDK, proprietary for Pulumi Cloud
Maintained by
Pulumi Corporation
Typically used for
Multi-cloud infrastructure, Kubernetes platforms, serverless backends, developer platforms built on top of IaC

The honest version

Pulumi pros and cons

No technology is all upside. This is where Pulumi earns its place and where it tends to cause trouble.

Where Pulumi is strong

  • Real languages mean real abstractionsLoops, conditionals, functions, classes and packages come from TypeScript or Python directly. You stop reinventing them in HCL and start writing code your engineers already know how to read.
  • Component resources compose cleanlyA ComponentResource groups related primitives behind one interface, so a team can ship a reusable VPC, cluster or queue as a package the rest of the company consumes with a few lines.
  • Any cloud and any KubernetesAWS, Azure, Google Cloud, DigitalOcean, Linode, Hetzner and Kubernetes resources all live in the same program and the same state, which keeps multi-cloud projects honest.
  • Policy as code through CrossGuardPulumi Policy Packs run against previews and blocks non-compliant changes before they are applied, with the policy itself written in the same language as the program.
  • Great story for building internal platformsPulumi Automation API lets you drive Pulumi programmatically, which is how teams build self-service portals that provision stacks without shelling out to the CLI.

Where Pulumi bites

  • The learning curve is longer than it looksInputs, outputs, apply and the resource graph are not obvious the first time. Engineers who are strong in TypeScript still get surprised by how async-like Pulumi outputs behave.
  • State locking is less mature than TerraformLocks held by cancelled runs, snapshots that grow past Pulumi Cloud limits and stack renames all have edge cases that only come up in anger during an incident.
  • Smaller community means fewer examplesFor any given problem there are more Terraform examples on the open internet than Pulumi examples, and the ones that exist are spread across several language ecosystems.
  • Pulumi Cloud pricing is per resourcePulumi Cloud bills on the number of resources under management, and large estates can get surprisingly expensive compared to a self-hosted S3 backend. Policy as a service is on top of that.
  • Refactoring resources has to be deliberateRenaming or restructuring resources triggers replacement unless you use aliases and resource options carefully. The flexibility of a real language makes it easier to do, and easier to get wrong.
  • Importing existing infrastructure is hit-and-misspulumi import works for many resource types and falls short on others, and the generated code is a starting point rather than idiomatic. Teams migrating from the console still spend real time on cleanup.

Sound familiar?

Common Pulumi problems we fix

The Pulumi problems that bring people to us, and what you have once each one is fixed.

failed to acquire lock on stack 'prod'

A stack is locked and no run can start

A previous pulumi up was killed before it released the lock, or two CI jobs raced. The lock is in state and only cancelling it by hand releases it; done wrong, state goes out of sync with reality.

Lock released and state consistent

Duplicate resource URN

Two resources claim the same URN

A refactor that renamed a resource without an alias, or a loop that generates the same name for two iterations. The preview fails before anything is applied.

URNs unique, refactor aliased

Cannot read properties of undefined (reading 'apply')

TypeError inside the Pulumi program

Code that reads an output before it is materialized, or a conditional that returns undefined on one branch. The program is valid TypeScript, but the Pulumi graph never gets built.

Outputs handled properly

InvalidInstanceID.NotFound on refresh

State diverged from the cloud

A resource deleted directly in the console, a region change that moved everything, or an account rotation. Pulumi refresh reports every missing resource and planning then produces unexpected replacements.

State aligned with reality

dependency cycle

Resources have a cycle in their graph

A security group that references another security group that references the first, or a reference to an output that depends on itself through a parent. Pulumi refuses to plan.

Dependencies acyclic and explicit

Pending create replace on protected resource

A protected resource would be replaced

A production RDS instance or an S3 bucket marked protected, and a program change that would normally trigger replacement. Pulumi halts rather than destroying the resource.

Change applied safely around protection

no matching version found

Provider plugin version is unavailable

A pinned provider version pulled from the Pulumi registry that has been deprecated or moved. CI fails to even download the plugin, and preview cannot run.

Providers pinned and resolvable

pulumi import: unknown schema

Imports of existing resources fail

A resource type that the provider does not fully support for import, or a nested property the import logic cannot infer. The generated code is empty or incorrect, and the resource is not adopted into state.

Existing resources adopted into state

What we do

Pulumi help, from rescue to steady state

Call us for one locked stack, or hand us the whole IaC repository.

Rescue
A stack that will not preview, a state file that drifted, or a lock held by a run that no longer exists. We bring the stack back to a predictable state before planning any changes.
Program review
A fresh pair of eyes on a Pulumi program that has grown by accretion, with refactors into component resources and proper use of inputs, outputs and aliases.
Migration into Pulumi
Importing existing cloud resources from AWS, Azure or Google Cloud into Pulumi state, with generated code cleaned up into idiomatic programs rather than a dump from pulumi import.
Terraform to Pulumi or Pulumi to Terraform
Moving IaC between the two engines without destroying infrastructure, with a side-by-side run until the new stack is proven and the old one can be retired.
Policy as code
CrossGuard policy packs written against your actual compliance needs, running on every preview so non-compliant changes never make it to apply.
Managed Tech
Provider version watch, periodic refactors, Pulumi Cloud cost review, and a team to call when a Friday deploy leaves a stack locked.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Pulumi alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Pulumi questions

Something else? Call+1 737 727 7327

Should we use Pulumi or Terraform?

If your team is comfortable in a real programming language and wants to share abstractions across projects, Pulumi earns its place. If your team is small and the examples you want to copy are nearly all Terraform, Terraform's larger ecosystem is still worth something. The two can coexist on an estate during migration, but running both long-term usually ends in confusion about which stack owns which resource.

How do we unlock a Pulumi stack safely?

The right sequence is to confirm no run is actually in progress, then pulumi cancel on the stack, then pulumi refresh to compare state against reality before doing anything else. Cancelling a lock while a run is genuinely still writing state leaves the state in a half-applied condition that is slow and risky to clean up.

Can you import existing AWS or Azure infrastructure into Pulumi?

Yes, and it is a frequent engagement. pulumi import handles many resource types directly, but the generated code is a starting point rather than idiomatic Pulumi, and some resources either do not support import or need the properties set carefully. We adopt the resources into state, refactor the code into component resources, and test previews until the diff is clean.

Why is our Pulumi program crashing with a TypeError?

The common cause is reading a Pulumi output as if it were a plain value: calling .toLowerCase() on an output that has not been materialized, or indexing into it directly. Outputs behave like promises combined with change tracking, and they need .apply() or interpolation to produce a value. We trace the specific chain and rewrite it to be output-safe.

Why is our Pulumi Cloud bill climbing?

Pulumi Cloud is billed on the number of resources under management, and stacks tend to grow faster than teams notice. A large Kubernetes deployment, for example, can generate thousands of resources without feeling like much in code. We review what is in state, work out whether some resources should live in their own stacks or move to a self-hosted backend, and give you the before and after numbers.

How much does Pulumi help cost?

Estimates are at no charge. Tell us the languages the stacks are written in, where state lives, and what has gone wrong, and we come back with a price before we touch any code.

Free estimate

Pulumi giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.