<@U04S8PLJWMT> terraform question. I have a mssql...
# ask-ai
a
@kapa.ai terraform question. I have a mssql source for which I set the method = "CDC" in the configuration. It appears that the terraform completely ignores the cdc setting, instead when I verify the source after creation there is no replication_method configured at all. This is the part of the configuration:
"replication_method": {
"method": "CDC",
"queue_size": 10000,
"initial_waiting_seconds": 300,
"initial_load_timeout_hours": 8,
"invalid_cdc_cursor_position_behavior": "Fail sync"
}
},
k
Based on the information in the knowledge sources, there is a known change in how the
replication_method
parameter is handled in the Microsoft SQL Server (MSSQL) source connector for Airbyte. Starting from version 0.4.18, the
replication_method
configuration parameter must be an object (not a string), for example:
Copy code
json "replication_method": {     "method": "CDC" }
If you are using Terraform or any other tool to provision the source and you notice that the
replication_method
is missing after creation, it could be due to: 1. Incorrect Configuration Format: Ensure that your configuration matches the required object format, as shown above. If you use the old string format, Airbyte will not recognize it after version 0.4.18 and newer, and the field may be ignored or dropped during processing. 2. Migration Issue: If you upgraded from an older connector version, you may need to manually update the configuration in the Airbyte database. The documentation provides SQL queries to update the
actor
table to the new format. For CDC, the query is:
Copy code
sql    update public.actor set configuration =jsonb_set(configuration, '{replication_method}', '{"method": "CDC"}', true)      WHERE actor_definition_id ='b5ea17b1-f170-46dc-bc31-cc744ca984c1' AND (configuration->>'replication_method' = 'CDC');
[Upgrading from 0.4.17 and older versions to 0.4.18 and newer versions](https://docs.airbyte.com/integrations/sources/mssql#upgrading-from-0417-and-older-versions-to-0418-and-newer-versions) 3. Terraform Provider Limitation: If you are using a community or custom Terraform provider for Airbyte, it may not yet support the new object format for
replication_method
. You should check the provider's documentation or source code to ensure it is passing the configuration correctly. 4. Validation or Serialization Issue: If the configuration is being sent correctly but is still missing after creation, there may be a bug or validation issue in the Airbyte API or the Terraform provider. Recommendation: - Double-check that your Terraform configuration uses the correct object format for
replication_method
. - If the problem persists, verify the actual payload sent to Airbyte and check the Airbyte UI or API to see how the source is stored. - If you upgraded from an older version, run the migration SQL as described above. If after these steps the issue remains, the knowledge sources do not provide further troubleshooting steps specific to Terraform, so you may need to consult the Terraform provider's documentation or open an issue with the provider or Airbyte project. Note: The knowledge sources do not mention support for additional CDC parameters like
queue_size
,
initial_waiting_seconds
,
initial_load_timeout_hours
, or
invalid_cdc_cursor_position_behavior
. If these are not recognized by Airbyte, they may be ignored. Only documented parameters are guaranteed to be supported. [Upgrading from 0.4.17 and older versions to 0.4.18 and newer versions](https://docs.airbyte.com/integrations/sources/mssql#upgrading-from-0417-and-older-versions-to-0418-and-newer-versions)