Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 3.88 KB

File metadata and controls

96 lines (73 loc) · 3.88 KB
page_title airbyte_connector_configuration - terraform-provider-airbyte
subcategory
description Resolves and merges connector configuration for use with airbyte_source or airbyte_destination resources. This data source resolves a connector name (and optional version) to its definition ID, fetches the connector's JSONSchema spec, validates configuration against it, and merges non-sensitive and sensitive configuration into a single JSON blob suitable for passing to a resource.

airbyte_connector_configuration (Data Source)

Resolves and merges connector configuration for use with airbyte_source or airbyte_destination resources.

This data source resolves a connector name (and optional version) to its definition ID, fetches the connector's JSONSchema spec, validates configuration against it, and merges non-sensitive and sensitive configuration into a single JSON blob suitable for passing to a resource.

Example Usage

Pin to a specific connector version

Fetch the spec for an exact version and validate configuration against it:

data "airbyte_connector_configuration" "github" {
  connector_name    = "source-github"
  connector_version = "2.0.0"

  configuration = {
    repositories = ["airbytehq/airbyte"]
    credentials = {
      option_title         = "PAT Credentials"
      personal_access_token = var.github_pat
    }
  }
}

Use the latest version with separate secrets

When connector_version is omitted, the latest spec is fetched. Use configuration_secrets to keep sensitive values hidden in plan output:

data "airbyte_connector_configuration" "postgres" {
  connector_name = "source-postgres"
  # connector_version = "3.6.28"  # optional: pin to a specific version

  configuration = {
    host     = "db.example.com"
    port     = 5432
    database = "mydb"
    schemas  = ["public"]
    ssl_mode = { mode = "prefer" }
  }

  configuration_secrets = {
    username = var.pg_user
    password = var.pg_password
  }
}

Pass resolved values to a resource

Use the data source outputs to configure an airbyte_source or airbyte_destination resource:

resource "airbyte_source" "postgres" {
  name          = "Postgres"
  definition_id = data.airbyte_connector_configuration.postgres.definition_id
  workspace_id  = var.workspace_id
  configuration = data.airbyte_connector_configuration.postgres.configuration_json
}

Schema

Required

  • configuration (Dynamic) Non-sensitive configuration values as an HCL object. These will be visible in Terraform plan output.
  • connector_name (String) The name of the connector (e.g. source-postgres, destination-bigquery).

Optional

  • configuration_secrets (Dynamic, Sensitive) Sensitive configuration values (API keys, passwords, etc.) as an HCL object. These are hidden in Terraform plan output. Keys here are deep-merged with (and override) keys in configuration.
  • connector_version (String) The version of the connector (e.g. 2.0.0). If not specified, the latest version is used. When set, the connector spec for that exact version is fetched and used for JSONSchema validation.
  • ignore_errors (Boolean) If true, validation errors (including JSONSchema validation) are reported as warnings instead of errors. Defaults to false.

Read-Only

  • configuration_json (String, Sensitive) The merged JSON configuration (non-sensitive + sensitive) for passing to an airbyte_source or airbyte_destination resource's configuration attribute.
  • connector_spec_json (String) The connector's connectionSpecification JSONSchema, as a JSON string. Useful for debugging or downstream tooling.
  • definition_id (String) The UUID of the connector definition, resolved from connector_name.
  • docker_image_tag (String) The resolved Docker image tag (version) of the connector.