Skip to content

Latest commit

 

History

History
242 lines (175 loc) · 9.06 KB

connection.md

File metadata and controls

242 lines (175 loc) · 9.06 KB
page_title subcategory description
airbyte_connection Resource - terraform-provider-airbyte
Connection Resource

airbyte_connection (Resource)

Connection Resource

Example Usage

resource "airbyte_connection" "my_connection" {
  configurations = {
    streams = [
      {
        cursor_field = [
          "..."
        ]
        mappers = [
          {
            id = "6563d1b7-013b-4974-a129-ba463c808f28"
            mapper_configuration = {
              field_renaming = {
                new_field_name      = "...my_new_field_name..."
                original_field_name = "...my_original_field_name..."
              }
            }
            type = "field-renaming"
          }
        ]
        name = "...my_name..."
        primary_key = [
          [
            # ...
          ]
        ]
        selected_fields = [
          {
            field_path = [
              "..."
            ]
          }
        ]
        sync_mode = "incremental_append"
      }
    ]
  }
  data_residency                       = "...my_data_residency..."
  destination_id                       = "5725b342-2d43-4e6c-90a4-e500c954e591"
  name                                 = "...my_name..."
  namespace_definition                 = "custom_format"
  namespace_format                     = SOURCE_NAMESPACE
  non_breaking_schema_updates_behavior = "ignore"
  prefix                               = "...my_prefix..."
  schedule = {
    cron_expression = "...my_cron_expression..."
    schedule_type   = "cron"
  }
  source_id = "b5b2b4a5-bba6-4c3f-b0ef-ab87b373f331"
  status    = "active"
  tags = [
    {
      color        = "...my_color..."
      name         = "...my_name..."
      tag_id       = "bf69ef26-2003-4c6e-9dfa-5867d7dba86a"
      workspace_id = "a46bf3e2-e63d-4e32-8959-37721daec43c"
    }
  ]
}

Schema

Required

  • destination_id (String) Requires replacement if changed.
  • source_id (String) Requires replacement if changed.

Optional

  • configurations (Attributes) A list of configured stream options for a connection. (see below for nested schema)
  • data_residency (String)
  • name (String) Optional name of the connection
  • namespace_definition (String) Define the location where the data will be stored in the destination. Default: "destination"; must be one of ["source", "destination", "custom_format"]
  • namespace_format (String) Used when namespaceDefinition is 'custom_format'. If blank then behaves like namespaceDefinition = 'destination'. If "${SOURCE_NAMESPACE}" then behaves like namespaceDefinition = 'source'.
  • non_breaking_schema_updates_behavior (String) Set how Airbyte handles syncs when it detects a non-breaking schema change in the source. Default: "ignore"; must be one of ["ignore", "disable_connection", "propagate_columns", "propagate_fully"]
  • prefix (String) Prefix that will be prepended to the name of each stream when it is written to the destination (ex. “airbyte_” causes “projects” => “airbyte_projects”). Default: ""
  • schedule (Attributes) schedule for when the the connection should run, per the schedule type (see below for nested schema)
  • status (String) must be one of ["active", "inactive", "deprecated"]
  • tags (Attributes List) (see below for nested schema)

Read-Only

  • connection_id (String)
  • created_at (Number)
  • workspace_id (String)

Nested Schema for configurations

Optional:

Nested Schema for configurations.streams

Optional:

  • cursor_field (List of String) Path to the field that will be used to determine if a record is new or modified since the last sync. This field is REQUIRED if sync_mode is incremental unless there is a default.
  • mappers (Attributes List) Mappers that should be applied to the stream before writing to the destination. (see below for nested schema)
  • name (String) Not Null
  • 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.
  • selected_fields (Attributes List) Paths to the fields that will be included in the configured catalog. (see below for nested schema)
  • sync_mode (String) must be one of ["full_refresh_overwrite", "full_refresh_overwrite_deduped", "full_refresh_append", "incremental_append", "incremental_deduped_history"]

Nested Schema for configurations.streams.mappers

Optional:

  • id (String)
  • mapper_configuration (Attributes) The values required to configure the mapper. Not Null (see below for nested schema)
  • type (String) Not Null; must be one of ["hashing", "field-renaming", "row-filtering", "encryption"]

Nested Schema for configurations.streams.mappers.mapper_configuration

Optional:

Nested Schema for configurations.streams.mappers.mapper_configuration.encryption

Optional:

Nested Schema for configurations.streams.mappers.mapper_configuration.encryption.aes

Optional:

  • algorithm (String) Not Null; must be one of ["RSA", "AES"]
  • field_name_suffix (String) Not Null
  • key (String, Sensitive) Not Null
  • mode (String) Not Null; must be one of ["CBC", "CFB", "OFB", "CTR", "GCM", "ECB"]
  • padding (String) Not Null; must be one of ["NoPadding", "PKCS5Padding"]
  • target_field (String) Not Null

Nested Schema for configurations.streams.mappers.mapper_configuration.encryption.rsa

Optional:

  • algorithm (String) Not Null; must be one of ["RSA", "AES"]
  • field_name_suffix (String) Not Null
  • public_key (String) Not Null
  • target_field (String) Not Null

Nested Schema for configurations.streams.mappers.mapper_configuration.field_renaming

Optional:

  • new_field_name (String) The new name for the field after renaming. Not Null
  • original_field_name (String) The current name of the field to rename. Not Null

Nested Schema for configurations.streams.mappers.mapper_configuration.hashing

Optional:

  • field_name_suffix (String) The suffix to append to the field name after hashing. Not Null
  • method (String) The hashing algorithm to use. Not Null; must be one of ["MD2", "MD5", "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512"]
  • target_field (String) The name of the field to be hashed. Not Null

Nested Schema for configurations.streams.mappers.mapper_configuration.row_filtering

Optional:

  • conditions (String) Not Null; Parsed as JSON.

Nested Schema for configurations.streams.selected_fields

Optional:

  • field_path (List of String)

Nested Schema for schedule

Optional:

  • cron_expression (String)
  • schedule_type (String) Not Null; must be one of ["manual", "cron"]

Read-Only:

  • basic_timing (String)

Nested Schema for tags

Optional:

  • color (String) Not Null
  • name (String) Not Null
  • tag_id (String) Not Null
  • workspace_id (String) Not Null

Import

Import is supported using the following syntax:

terraform import airbyte_connection.my_airbyte_connection ""