# Insight

> Resource Insight in pulumi-posthog.

<!-- Generated from the pulumi-posthog SDK. -->

Resource Insight in pulumi-posthog.

Pulumi type: `posthog:index/insight:Insight`.

`name` is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as posthog from "pulumi-posthog"

const resource = new posthog.Insight("insight", {})
```

## Arguments

| Property         | Type       | Required | Description                                                                                                                                                                                                                                                                                                                          |
| ---------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `createInFolder` | `string`   | no       | Folder identifier used only during insight creation.                                                                                                                                                                                                                                                                                 |
| `dashboardIds`   | `number[]` | no       | List of dashboard ids which should contain the insight.                                                                                                                                                                                                                                                                              |
| `deleted`        | `boolean`  | no       | Whether the insight is deleted (soft delete)                                                                                                                                                                                                                                                                                         |
| `derivedName`    | `string`   | no       | Insight derived name. This is auto-generated by PostHog when the name is not set.                                                                                                                                                                                                                                                    |
| `description`    | `string`   | no       | Insight description.                                                                                                                                                                                                                                                                                                                 |
| `name`           | `string`   | no       | Insight name.                                                                                                                                                                                                                                                                                                                        |
| `projectId`      | `string`   | no       | Project ID (environment) for this resource. Overrides the provider-level project_id.                                                                                                                                                                                                                                                 |
| `queryJson`      | `string`   | no       | Raw JSON serialized query payload accepted by PostHog (for example an `InsightVizNode` with a `TrendsQuery`). Mutually exclusive with `querySql`; exactly one must be set.                                                                                                                                                           |
| `querySql`       | `string`   | no       | Raw HogQL SQL for the insight (for example `SELECT count() FROM events`). The provider wraps it in a `DataVisualizationNode`/`HogQLQuery` query. Use `file("queries/x.sql")` to load from a `.sql` file. Mutually exclusive with `queryJson`; exactly one must be set. For chart or column display options, use `queryJson` instead. |
| `tags`           | `string[]` | no       | List of tags to apply to the insight.                                                                                                                                                                                                                                                                                                |

## Outputs

Computed outputs are produced by the provider. They are not constructor arguments.

| Property         | Type       | Computed | Description                                                                                                                                                                                                                                                                                                                          |
| ---------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `createInFolder` | `string`   | no       | Folder identifier used only during insight creation.                                                                                                                                                                                                                                                                                 |
| `dashboardIds`   | `number[]` | no       | List of dashboard ids which should contain the insight.                                                                                                                                                                                                                                                                              |
| `deleted`        | `boolean`  | no       | Whether the insight is deleted (soft delete)                                                                                                                                                                                                                                                                                         |
| `derivedName`    | `string`   | no       | Insight derived name. This is auto-generated by PostHog when the name is not set.                                                                                                                                                                                                                                                    |
| `description`    | `string`   | no       | Insight description.                                                                                                                                                                                                                                                                                                                 |
| `insightId`      | `number`   | yes      | Numeric ID of the insight.                                                                                                                                                                                                                                                                                                           |
| `name`           | `string`   | no       | Insight name.                                                                                                                                                                                                                                                                                                                        |
| `projectId`      | `string`   | no       | Project ID (environment) for this resource. Overrides the provider-level project_id.                                                                                                                                                                                                                                                 |
| `queryJson`      | `string`   | no       | Raw JSON serialized query payload accepted by PostHog (for example an `InsightVizNode` with a `TrendsQuery`). Mutually exclusive with `querySql`; exactly one must be set.                                                                                                                                                           |
| `querySql`       | `string`   | no       | Raw HogQL SQL for the insight (for example `SELECT count() FROM events`). The provider wraps it in a `DataVisualizationNode`/`HogQLQuery` query. Use `file("queries/x.sql")` to load from a `.sql` file. Mutually exclusive with `queryJson`; exactly one must be set. For chart or column display options, use `queryJson` instead. |
| `shortId`        | `string`   | yes      | Short ID of the insight (the value shown in the insight's URL). Use this with the `posthog.Insight` data source to look up the insight.                                                                                                                                                                                              |
| `tags`           | `string[]` | no       | List of tags to apply to the insight.                                                                                                                                                                                                                                                                                                |
