terraformairbyte

Where to find workspace_id in Airbyte?


I am trying to use Terraform to set up a Postgres source in Airbyte. Based on https://registry.terraform.io/providers/airbytehq/airbyte/latest/docs/resources/source_postgres

Here is my Terraform code:

resource "airbyte_source_postgres" "my_airbyte_source_postgres" {
  name         = var.source_name
  workspace_id = var.workspace_id
  configuration = {
    host     = var.postgres_host
    port     = var.postgres_port
    username = var.postgres_user_name
    password = var.postgres_password
    database = var.postgres_database
    schemas  = var.postgres_schemas
    replication_method = {
      read_changes_using_write_ahead_log_cdc = {
        replication_slot = var.postgres_replication_slot
        publication      = var.postgres_publication
      }
    }
    ssl_mode = {
      require = {}
    }
  }
}

Based on the document, workspace_id is a required field. But it does not say where to find it. I searched online, but none of documents mention how to get workspace_id.

I am experimenting with the open-source version of Airbyte and I am wondering where I can find the workspace_id. Is the workspace_id specific to the Airbyte Cloud version, or does it also apply to the open-source version? Thanks!


Solution

  • I just found out the open-source Airbyte platform also uses workspace_id, which I believe is automatically generated during deployment.

    If I navigate to the Airbyte UI at http://localhost:8000/workspaces, it redirects me to a URL such as http://localhost:8000/workspaces/6937391e-62a6-48fc-8580-683528347d07/connections.

    And here 6937391e-62a6-48fc-8580-683528347d07 is the workspace_id.