sincecutoff.com
← all changes

Pulumi resource existence checks without stack adoption

Introduced 2026-10-28 · score 0.94

HOW TO USE IT

When checking a resource by ID without adding it to stack state, call PCL’s `resourceExists` builtin or the generated Node.js resource class’s static `exists` method.

resourceExists("<package>:<module>:<Resource>", "<resource-id>")
await Resource.exists("<resource-id>")

WHY THIS HELPS

Check whether a resource with a known ID exists while working with a Pulumi stack, without adopting that resource into the stack.

REQUIREMENTS AND LIMITATIONS

  • Version: 3.273.0
  • type (required): PCL resource type token.
  • id (required): Resource ID to check; Node.js accepts `Input<string>`.
  • state: Optional resource properties passed to the provider’s `Read`.
  • Prerequisite: Generated Node.js SDKs require `@pulumi/pulumi` version `3.269.0` or later.
  • The static `exists` methods are described for generated Node.js SDKs.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card