eknazar adv
03/09/2026, 5:17 AMkapa.ai
03/09/2026, 5:17 AMairbyte_source_mongodb_v2 is a typed connector-specific resource that is deprecated in provider 1.0 and will be removed in 1.1. You need to migrate to the generic airbyte_source resource. [Migrating to 1.0]
Here's how to migrate your MongoDB source:
Step 1 — Replace the typed resource
Before:
resource "airbyte_source_mongodb_v2" "mongodb_source_v2" {
configuration = {
database_config = {
self_managed_replica_set = {
connection_string = "mongodb://example1.host.com:27017,..."
databases = ["mydb"]
username = "...my_username..."
password = "...my_password..."
auth_source = "admin"
schema_enforced = false
}
}
}
name = "...my_name..."
workspace_id = var.workspace_id
}
After:
data "airbyte_connector_configuration" "mongodb_config" {
connector_name = "source-mongodb-v2"
configuration = {
database_config = {
self_managed_replica_set = {
connection_string = "mongodb://example1.host.com:27017,..."
databases = ["mydb"]
username = "...my_username..."
auth_source = "admin"
schema_enforced = false
}
}
}
configuration_secrets = {
password = var.db_password
}
}
resource "airbyte_source" "mongodb_source_v2" {
name = "...my_name..."
workspace_id = var.workspace_id
definition_id = data.airbyte_connector_configuration.mongodb_config.definition_id
configuration = data.airbyte_connector_configuration.mongodb_config.configuration_json
}
# Prevents Terraform from destroying and recreating the existing resource
moved {
from = airbyte_source_mongodb_v2.mongodb_source_v2
to = airbyte_source.mongodb_source_v2
}
Step 2 — Update any references
# Before:
source_id = airbyte_source_mongodb_v2.mongodb_source_v2.source_id
# After:
source_id = airbyte_source.mongodb_source_v2.source_id
Step 3 — Plan and apply
Run terraform plan and confirm there are no destroy actions — Terraform should show moved for the resource, not `create`/`destroy`. Then run terraform apply. [Migration walkthrough]
> Note: The moved block requires Terraform 1.8 or later. The airbyte_connector_configuration data source also validates your configuration against the connector's JSON schema at terraform plan time, catching errors before apply. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.