HashiCorp Cloud Platform
Infragraph queries
Queries are the method for filtering data in the resource graph.
When you build a query, you have the option to select a pre-built query to search your data. Pre-built queries help you get started with the resource graph features. You can edit queries after you run them to return more specific results.
Query building blocks
Query building blocks are the edges, nodes, operators, and conditions that exist in the query interface.
There are over a thousand different conditions, edges, and operators that you can apply. The graph explorer includes a UI tool that helps you build queries by categorizing resources according to their function and their relationships to other resources.
Infragraph supports the following query predicates to describe resource relationships:
- Does/does not
- Equal to, less than, greater than
- Exists/Does not exist
- Any relationship
- Anything
- Contains
- Applies To
- Attaches To
- Runs
- Instance of
- Has Current
- Runs On
- Produces
- Stores
- Manages
If you cannot find an option you want to query on, you can use JSON to query the graph. For example JSON queries, refer to Infragraph example queries.
Query catalog
After you build a query, you have the option to save it in the query catalog for repeat use.
To access the query catalog, click Query catalog in your HCP organization's left navigation panel.
To run a query, click its name. Alternatively, next to the query you want to run, click ... and the Run Query.