# ExternalDataSource

> Resource ExternalDataSource in pulumi-posthog.

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

Resource ExternalDataSource in pulumi-posthog.

Pulumi type: `posthog:index/externalDataSource:ExternalDataSource`.

`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.ExternalDataSource("externalDataSource", {
  jobInputsJson: "<jobInputsJson>",
  schemas: ["<schemas>"],
  sourceType: "Stripe",
})
```

## Arguments

| Property        | Type       | Required | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `jobInputsJson` | `string`   | yes      | JSON-encoded connection configuration for the source. Shape depends on `sourceType`. For example Postgres expects `{host, port, database, user, password, schema}`; Stripe expects `{stripe_account_id, stripe_secret_key}`. PostHog redacts secret values when reading, so the plan value is preserved in state. On import, redacted secrets will appear in state until the next apply with real values. |
| `prefix`        | `string`   | no       | Optional prefix for synced table names (e.g. `stripe_prod_`). Useful when connecting multiple sources of the same type. The PostHog update endpoint silently ignores prefix changes for non-direct-postgres sources, so this resource treats it as RequiresReplace.                                                                                                                                       |
| `projectId`     | `string`   | no       | Project ID (environment) for this resource. Overrides the provider-level project_id.                                                                                                                                                                                                                                                                                                                      |
| `schemas`       | `string[]` | yes      | List of table names to sync from the source (e.g. `["users", "orders"]`). PostHog discovers available tables from the source; these must match discovered table names. The source-level update endpoint cannot edit the schema list, so changes force destroy+recreate.                                                                                                                                   |
| `sourceType`    | `string`   | yes      | Source type recognised by the PostHog data warehouse (e.g. `Stripe`, `Postgres`, `Snowflake`, `BigQuery`, `Hubspot`). PostHog defines the set of accepted values and may add new types over time; see the PostHog data warehouse docs for the current list. Cannot be changed after creation.                                                                                                             |

## Outputs

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

| Property        | Type       | Computed | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `createdAt`     | `string`   | yes      | Timestamp when the source was created.                                                                                                                                                                                                                                                                                                                                                                    |
| `jobInputsJson` | `string`   | no       | JSON-encoded connection configuration for the source. Shape depends on `sourceType`. For example Postgres expects `{host, port, database, user, password, schema}`; Stripe expects `{stripe_account_id, stripe_secret_key}`. PostHog redacts secret values when reading, so the plan value is preserved in state. On import, redacted secrets will appear in state until the next apply with real values. |
| `lastRunAt`     | `string`   | yes      | Timestamp of the most recent sync run.                                                                                                                                                                                                                                                                                                                                                                    |
| `prefix`        | `string`   | no       | Optional prefix for synced table names (e.g. `stripe_prod_`). Useful when connecting multiple sources of the same type. The PostHog update endpoint silently ignores prefix changes for non-direct-postgres sources, so this resource treats it as RequiresReplace.                                                                                                                                       |
| `projectId`     | `string`   | no       | Project ID (environment) for this resource. Overrides the provider-level project_id.                                                                                                                                                                                                                                                                                                                      |
| `schemas`       | `string[]` | no       | List of table names to sync from the source (e.g. `["users", "orders"]`). PostHog discovers available tables from the source; these must match discovered table names. The source-level update endpoint cannot edit the schema list, so changes force destroy+recreate.                                                                                                                                   |
| `sourceType`    | `string`   | no       | Source type recognised by the PostHog data warehouse (e.g. `Stripe`, `Postgres`, `Snowflake`, `BigQuery`, `Hubspot`). PostHog defines the set of accepted values and may add new types over time; see the PostHog data warehouse docs for the current list. Cannot be changed after creation.                                                                                                             |
| `status`        | `string`   | yes      | Current status reported by PostHog (e.g. `Running`, `Completed`, `Error`).                                                                                                                                                                                                                                                                                                                                |
| `syncFrequency` | `string`   | yes      | Sync cadence reported by PostHog. Defaults to 6 hours (5 minutes for CDC schemas) and is not configurable on this resource — the create endpoint does not accept a sync frequency. Reports the value of the first schema; sources with mixed schedules will see this flap. Modify per-schema cadence via the PostHog UI or schemas API.                                                                   |
