terraform-provider-airbyte icon indicating copy to clipboard operation
terraform-provider-airbyte copied to clipboard

Airbyte Provider does not detect updates when adding new streams to connections

Open sousaherbert opened this issue 1 year ago • 1 comments

Hi!

I have the following implementation in terraform and already deployed into Airbyte:

resource "airbyte_connection" "hubspot_s3_landing_zone" {
  source_id      = var.hubspot_source_id
  destination_id = var.hubspot_destination_id

  data_residency                       = "auto"
  namespace_format                     = "$${SOURCE_NAMESPACE}"
  namespace_definition                 = "custom_format"
  non_breaking_schema_updates_behavior = "ignore"
  status                               = "active"

  configurations = {
    stream = [
      {
        name         = "contacts"
        sync_mode    = "incremental_append"
        cursor_field = ["updatedAt"]
        primary_key  = [["id"]]
      }
    ]
  }

  schedule = {
    schedule_type = "manual"
  }
}

Today when I tried to add new streams as in the code below, the terraform plan did not detected the addition of new streams.

resource "airbyte_connection" "hubspot_s3_landing_zone" {
  source_id      = var.hubspot_source_id
  destination_id = var.hubspot_destination_id

  data_residency                       = "auto"
  namespace_format                     = "$${SOURCE_NAMESPACE}"
  namespace_definition                 = "custom_format"
  non_breaking_schema_updates_behavior = "ignore"
  status                               = "active"

  configurations = {
    stream = [
      {
        name         = "contacts"
        sync_mode    = "incremental_append"
        cursor_field = ["updatedAt"]
        primary_key  = [["id"]]
      },
      {
        name         = "deals"
        sync_mode    = "incremental_append"
        cursor_field = ["updatedAt"]
        primary_key  = [["id"]]
      },
      {
        name         = "owners"
        sync_mode    = "incremental_append"
        cursor_field = ["updatedAt"]
        primary_key  = [["id"]]
      },
      {
        name         = "deal_pipelines"
        sync_mode    = "incremental_append"
        cursor_field = ["updatedAt"]
        primary_key  = [["pipelineId"]]
      }
    ]
  }

  schedule = {
    schedule_type = "manual"
  }
}

Any guess if this is a real issue or it is something I am missing?

I am using:

terraform {
  required_providers {
    airbyte = {
      source  = "airbytehq/airbyte"
      version = "0.2.0"
    }
  }
}

But I already tested with versions 0.3.0 and 0.3.5

sousaherbert avatar Dec 06 '23 21:12 sousaherbert

FYI I tested this, but couldn't replicate using virtually equivalent terraform specifications. Is this still happening?

The only way I could get a replication was if I'd already changed my remote instance of the streams first (in which case it was reconciled, and didn't detect changes). Might be something with my local setup though.

ThomasRooney avatar Feb 05 '24 19:02 ThomasRooney