Hi All, Using the Terraform provider <Airbyte conn...
# replication-ask-ai
i
Hi All, Using the Terraform provider Airbyte connection resource, I'm able to set up a connection without adding stream config as below.
Copy code
resource "airbyte_connection" "mysql_src_tf_bigquery_dest_tf" {
  configurations = {
  }
  name                 = "mysql_src_tf <> bigquery_dest_tf"
  non_breaking_schema_updates_behavior = "ignore"
  schedule = {
    schedule_type = "manual"
  }
  destination_id = airbyte_destination_bigquery.bigquery_dest_tf.destination_id
  source_id      = airbyte_source_mysql.mysql_src_tf.source_id
  status         = "active"
}
However, I'm unable to get the stream config working. Is there example code that one could recommend. Attempt below.
Copy code
resource "airbyte_connection" "mysql_src_tf_bigquery_dest_tf" {
  configurations = {
    streams = [
      {
        name = "table_a"
        sync_mode = "full_refresh_overwrite"
      },
    ]
  }
  name                 = "mysql_src_tf <> bigquery_dest_tf"
  non_breaking_schema_updates_behavior = "ignore"
  schedule = {
    schedule_type = "manual"
  }
  destination_id = airbyte_destination_bigquery.bigquery_dest_tf.destination_id
  source_id      = airbyte_source_mysql.mysql_src_tf.source_id
  status         = "active"
}
k
Based on the information provided in the extracts, it seems you are trying to set up a connection between MySQL and BigQuery using the Airbyte Terraform provider. However, the extracts do not provide specific information about using the Terraform provider for Airbyte. However, there is information about how to set up a connection using the Octavia CLI, which is a command-line interface for Airbyte. For instance, you can create a connection configuration in YAML and apply it to your Airbyte instance using the
octavia apply
command. Here is an example of a connection configuration:
Copy code
yaml configuration:   status: active   namespace_definition: source   namespace_format: "${SOURCE_NAMESPACE}"   prefix: ""   resource_requirements:     cpu_limit: ""     cpu_request: ""     memory_limit: ""     memory_request: ""   schedule_type: manual   sync_catalog:      streams:       - config:           alias_name: cities           cursor_field: []           destination_sync_mode: overwrite           primary_key: []           selected: true           sync_mode: full_refresh         stream:           default_cursor_field: []           json_schema:             properties:               city:                 type: string               city_code:                 type: string             type: object           name: cities           namespace: public           source_defined_primary_key: []           supported_sync_modes:             - full_refresh             - incremental
You can apply this configuration using the command
octavia apply -f connections/postgres_to_bigquery/configuration.yaml
[source](https://airbyte.com/tutorials/version-control-airbyte-configurations). Please note that the stream configuration is generated automatically and you should only edit
streams.config
. The
streams.stream
should not be edited as the schema cannot be changed. For more specific information about using the Terraform provider for Airbyte, I recommend referring to the official Terraform documentation or the Airbyte documentation.
i
@kapa.ai I'm referring to the Airbyte Terraform provider Airbyte connection resource stream configuration.
👀 1