airbytehq / terraform-provider-airbyte

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

Source file-secure is removed #44

Open aleloi opened 1 year ago

aleloi commented 1 year ago

As of https://github.com/airbytehq/airbyte/pull/31477, the resource "airbyte_source_file_secure" no longer works. I think it will work if "source_type" is allowed to be "file". I get this error when trying to apply this resource definition:

resource "airbyte_source_file_secure" "name" {
  name         = "JSON "
  workspace_id = var.airbyte_workspace_id
  configuration = {
    dataset_name = "customers"
    format       = "json"
    url            = "gs://REDACTED.json"
    provider = {
      source_file_secure_storage_provider_gcs_google_cloud_storage = {
        storage         = "GCS"
    service_account_json = file(var.airbyte_sa_key)
      }
    }
    source_type    = "file-secure"  # This should now be 'file', which is not allowed
  }
}

error:

│ {"configuration":{"dataset_name":"customers","format":"json","provider":{"service_account_json":"REDACTED","storage":"GCS"},"sourceType":"file-secure","url":"gs://REDACTED.json"},"name":"JSON","workspaceId":"baf7803c-971d-4a6d-b0b1-c13332c1da92"}
│ 
│ **Response**:
│ HTTP/1.1 400 Bad Request
│ Content-Length: 155
│ Connection: keep-alive
│ Content-Type: application/problem+json
│ Date: Tue, 24 Oct 2023 09:22:35 GMT
│ Server: nginx/1.25.2
│ 
│ {"type":"https://reference.airbyte.com/reference/errors","title":"value-not-found","status":400,"detail":"Submitted
│ value could not be found: file-secure"}
╵
comtef commented 1 year ago

Hi @aleloi I tried to downgrade my version of airflow but I can't get this resource to work. Do you have any provider / airflow versions that works together?

aleloi commented 1 year ago

Hi @aleloi I tried to downgrade my version of airflow but I can't get this resource to work. Do you have any provider / airflow versions that works together?

Hi, I tested removing docker containers and volumes, checking out an earlier tagged release, and running run-ab-platform.sh. I couldn't get it to work either.

julien3 commented 11 months ago

This resource has been replaced with airbyte_source_file (https://registry.terraform.io/providers/airbytehq/airbyte/latest/docs/resources/source_file). This new resource works as expected so I guess this ticket can be closed now?