Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
jbfbell committed Nov 14, 2023
1 parent 6e55dd8 commit b1e7349
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/resources/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,40 @@ resource "airbyte_connection" "my_connection" {
}
```

With Stream Module

```terraform
module "source_postgres_streams" {
source = "airbytehq/stream-discovery/airbyte"
airbyte_api_token = var.airbyte_api_token
source_id = airbyte_source_postgres.my_source_postgres.source_id
destination_id = airbyte_destination_bigquery.my_destination_bigquery.destination_id
}
locals {
full_refresh_streams = [for stream in module.source_postgres_streams.streams :
{
name = stream.streamName
sync_mode = "full_refresh_overwrite"
}
]
}
resource "airbyte_connection" "postgres_to_bigquery_full_refresh" {
name = "Postgres to BigQuery Full Refresh"
source_id = airbyte_source_postgres.my_source_postgres.source_id
destination_id = airbyte_destination_bigquery.my_destination_bigquery.destination_id
schedule = {
schedule_type = "manual"
}
configurations = {
streams = local.full_refresh_streams
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

Expand Down Expand Up @@ -94,6 +128,8 @@ Optional:
- `primary_key` (List of List of String) Paths to the fields that will be used as primary key. This field is REQUIRED if `destination_sync_mode` is `*_dedup` unless it is already supplied by the source schema.
- `sync_mode` (String) must be one of ["full_refresh_overwrite", "full_refresh_append", "incremental_append", "incremental_deduped_history"]

## Stream Module
If you want to discover the available streams programmatically with terraform, we have released a [Stream Discovery Module](https://registry.terraform.io/modules/airbytehq/stream-discovery/airbyte/latest) which fetches the available streams and sync modes between a source and destination.


<a id="nestedatt--schedule"></a>
Expand Down

0 comments on commit b1e7349

Please sign in to comment.