airbytehq / terraform-provider-airbyte

Terraform Provider for Airbyte API
https://api.airbyte.com/
MIT License
45 stars 21 forks source link

Mongo source_type="mongodb" value-not-found #28

Open loremaps opened 1 year ago

loremaps commented 1 year ago

Hi,

Using the helm chart version 0.48.2 and app version 0.50.22 I cannot create a mongo source.

The server is rejecting the source_type = "mongodb" as value-not-found:

airbyte_source_mongodb.my_source_mongodb: Creating...
╷
│ Error: unexpected response from API. Got an unexpected response code 400
│ 
│   with airbyte_source_mongodb.my_source_mongodb,
│   on main.tf line 31, in resource "airbyte_source_mongodb" "my_source_mongodb":
│   31: resource "airbyte_source_mongodb" "my_source_mongodb" {
│ 
│ **Request**:
│ POST /v1/sources HTTP/1.1
│ Host: 127.0.0.1:23315
│ Accept: application/json
│ Authorization: Basic Og==
│ Content-Type: application/json
│ User-Agent: speakeasy-sdk/terraform 0.3.2 2.84.3 1.0.0
│ 
│ {"configuration":{"auth_source":"admin","database":"test","instance_type":{"cluster_url":"dev1.xxx00.mongodb.net","instance":"atlas"},"password":"airbyte","sourceType":"mongodb","user":"airbyte"},"name":"Mongo","workspaceId":"32288aa4-9e8b-4d70-8552-d8d5e2e7b4bb"}
│ 
│ **Response**:
│ HTTP/1.1 400 Bad Request
│ Content-Length: 151
│ Connection: keep-alive
│ Content-Type: application/problem+json
│ Date: Fri, 25 Aug 2023 14:08:06 GMT
│ 
│ {"type":"https://reference.airbyte.com/reference/errors","title":"value-not-found","status":400,"detail":"Submitted value could not be found:
│ mongodb"}

I am testing this on an OSS self-host instance. It works for Cloud version.

Thanks

ceik commented 1 year ago

facing the same issue on airbyte 0.50.27 and terraform provider 0.3.3

jeroenlanckmans commented 1 year ago

for the open-source version the source_type should be mongodb-v2 when looking at the API, this is not allowed value in terraform. @terencecho how to fix this as the terraform code is generated.

ThomasCouz commented 11 months ago

facing the same issue on airbyte 0.50.34 and terraform provider 0.3.4 this makes not possible the creation of a mongodb source by terraform unfortunately

Kamaradeivanov commented 10 months ago

Have you try mongodb-v2 ?