Skip to content
Latchkey

Pulumi "no stack named ... found" in CI

Pulumi looked for the named stack in the current backend and organization and did not find it. The login is valid; the stack simply is not where the CLI is looking.

What this error means

A pulumi stack select <name> or pulumi up --stack <name> step fails with "error: no stack named 'X' found". Other stacks may select fine.

pulumi
error: no stack named 'dev' found

Common causes

Wrong backend or organization

The stack exists under a different Pulumi Cloud organization or a different self-managed backend than the one CI logged into.

The stack was never created in this backend

CI expects a stack that only exists locally on a developer machine or was never initialized in the shared backend.

How to fix it

Select with the fully qualified name or create it

  1. List stacks to see what the backend actually has.
  2. Use the org-qualified name, or create the stack if it is genuinely new.
  3. Re-run the command.
Terminal
pulumi stack ls
pulumi stack select myorg/myproject/dev --create

Point at the correct backend

Log in to the backend that holds the stack, or set PULUMI_BACKEND_URL to it before selecting.

.github/workflows/ci.yml
env:
  PULUMI_BACKEND_URL: s3://my-pulumi-state

How to prevent it

  • Reference stacks by their org-qualified name in CI.
  • Ensure shared stacks are created in the shared backend, not just locally.
  • Pin the backend so every job looks in the same place.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →