---
title: pulumi insights resource search | CLI commands
url: /docs/iac/cli/commands/pulumi_insights_resource_search/
---

[EXPERIMENTAL] Search for resources discovered by Pulumi Insights

## Synopsis

[EXPERIMENTAL] Search resources discovered by Pulumi Insights across an
organization, with advanced filtering, sorting, and pagination.

--query accepts the Pulumi query syntax. --sort takes one or more fields and
may be repeated; --asc flips the direction to ascending (default: descending).
--page selects a 1-based page up to 10,000 total results; beyond that use --cursor
with the token surfaced in a previous response (Enterprise plans only).
--properties=true asks the server to include each resource's input/output
values — requires a supported subscription. --collapse consolidates resources
that exist in multiple sources (e.g. an IaC stack and an Insights scan).

Wraps the `GetOrgResourceSearchV2Query` Pulumi Cloud REST endpoint.

```
pulumi insights resource search [flags]
```

## Examples

```
  # Find every S3 bucket the org has discovered.
  pulumi insights resource search --query 'type:aws:s3/bucket:Bucket'

  # Page through results 50 at a time, sorted by modification time.
  pulumi insights resource search --sort modified --page-size 50 --page 1

  # Continue from a cursor surfaced by a previous response.
  pulumi insights resource search --cursor <opaque-cursor>

  # JSON output for scripting.
  pulumi insights resource search --query 'aws:s3' --output json
```

## Options

```
      --asc             Sort in ascending order (default: descending)
      --collapse        Consolidate resources that exist in multiple sources into a single result
      --cursor string   Opaque cursor to continue pagination from (Enterprise plans only)
  -h, --help            help for search
      --org string      Organization to search within (defaults to the current default org)
      --output string   Output format. One of: default, table, json (default "default")
      --page int        1-based page of results to return (max 10,000 total results)
      --page-size int   Number of results per page
      --properties      Include resource input/output values (requires a supported subscription)
  -q, --query string    Search query in Pulumi query syntax
      --sort strings    Field(s) to sort results by; repeat or comma-separate for multiple. Allowed values: category, created, custom, delete, dependencies, id, managed, modified, module, name, package, parentUrn, project, protected, providerUrn, stack, type, urn
```

## Options inherited from parent commands

```
      --color string                 Colorize output. Choices are: always, never, raw, auto (default "auto")
  -C, --cwd string                   Run pulumi as if it had been started in another directory
      --disable-integrity-checking   Disable integrity checking of checkpoint files
  -e, --emoji                        Enable emojis in the output
  -Q, --fully-qualify-stack-names    Show fully-qualified stack names
      --logflow                      Flow log settings to child processes (like plugins)
      --logtostderr                  Log to stderr instead of to files
      --memprofilerate int           Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
      --non-interactive              Disable interactive mode for all commands
      --otel-traces string           Export OpenTelemetry traces to the specified endpoint. Use file:// for local JSON files, grpc:// for remote collectors
      --profiling string             Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
      --tracing file:                Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
  -v, --verbose int                  Enable verbose logging (e.g., v=3); anything >3 is very verbose
```

## SEE ALSO

* [pulumi insights resource](/docs/iac/cli/commands/pulumi_insights_resource/)	 - [EXPERIMENTAL] Inspect resources discovered by Pulumi Insights


