Hey folks! :wave: We're hitting a Terraform provid...
# replication-troubleshooting
j
Hey folks! 👋 We're hitting a Terraform provider bug when trying to create an airbyte_source_custom, airbyte_destination_custom, and airbyte_connection (with multiple streams) in a single terraform apply.
Error: Provider produced invalid plan
Provider "<http://registry.terraform.io/airbytehq/airbyte|registry.terraform.io/airbytehq/airbyte>" planned an invalid value
for airbyte_connection.oracle_fusion_fscm_databricks_sync.configurations.streams:
count in plan (cty.UnknownVal(cty.Number)) disagrees with count in config
(cty.NumberIntVal(5)).
This is a bug in the provider, which should be reported in the provider's
own issue tracker.
Provider version: airbytehq/airbyte ~> 0.13.0 Terraform version: hashicorp/terraform v1.x What we're doing:
Copy code
resource "airbyte_connection" "oracle_fusion_fscm_databricks_sync" {
  name           = "DIP-OracleFusionFSCM-Databricks-Sync"
  source_id      = airbyte_source_custom.oracle_fusion_fscm_source.source_id
  destination_id = airbyte_destination_custom.oracle_fusion_fscm_destination.destination_id
  configurations = {
    streams = [
      { name = "stream_1", sync_mode = "incremental_deduped_history", ... },
      { name = "stream_2", sync_mode = "incremental_deduped_history", ... },
      { name = "stream_3", sync_mode = "incremental_deduped_history", ... },
      { name = "stream_4", sync_mode = "incremental_deduped_history", ... },
      { name = "stream_5", sync_mode = "incremental_deduped_history", ... },
    ]
  }
}
Observations: 1. ✅ Works fine with 1 stream in the connection 2. ❌ Fails with 5 streams — count in plan (UnknownVal) disagrees with count in config (5) 3. ✅ Works fine with 5 streams if source already exists in state (i.e. only connection is being created) 4. The issue only occurs on first-time creation when source_id is (known after apply) Root cause hypothesis: When source_id is unknown at plan time, the provider tries to validate the stream count against the source's catalog but gets UnknownVal — this only manifests with N>1 streams. Questions: 1. Is this a known issue in airbytehq/airbyte provider v0.13.0? 2. Is there a workaround to create source + connection with multiple streams in a single apply?