{
  "slug": "pulumi-resource-existence-checks-without-stack-adoption-644c354b0134",
  "title": "Pulumi resource existence checks without stack adoption",
  "tools": [
    "pulumi"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-28T19:51:35.000Z",
  "announced_at": "2026-10-28T19:51:35.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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.",
    "examples": [
      "resourceExists(\"<package>:<module>:<Resource>\", \"<resource-id>\")",
      "await Resource.exists(\"<resource-id>\")"
    ],
    "gotchas": [
      "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."
    ]
  },
  "why_it_matters": "Check whether a resource with a known ID exists while working with a Pulumi stack, without adopting that resource into the stack.",
  "sources": [
    "https://github.com/pulumi/pulumi/releases/tag/v3.273.0",
    "https://github.com/pulumi/pulumi/pull/25321/files",
    "https://github.com/pulumi/pulumi/pull/25329"
  ],
  "rank": 0.94039,
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261028-20",
    "verdict_id": "daily-20261028-20:daily-20261028-20-f94aeaa67839968b-2:gate",
    "evidence_hash": "37dc78ff73e6a6fa14c39c9dd3bd66f56debc7af6fc3b4caba1f9b2e5344c071"
  }
}
