Error setting up Airbyte destination using Terraform

Summary

Setting up a resource using Terraform for an Airbyte destination is resulting in an unexpected response code 400 from the API, indicating a resource not found error.


Question

Hello! I’m trying to setup a resource using Terraform on an Airflow instance deployed using Helm on k8s running version 0.50.51.
I’ve retrieved the workspace Id from the url and defined the resource in http://main.tf|main.tf like this:

  configuration = {
    azure_blob_storage_account_key          = "xxx"
    azure_blob_storage_account_name         = "xxx"
    azure_blob_storage_container_name       = "xxx"
    azure_blob_storage_endpoint_domain_name = "<http://blob.core.windows.net|blob.core.windows.net>"
    azure_blob_storage_output_buffer_size   = 5
    azure_blob_storage_spill_size           = 500
    format = {
      json_lines_newline_delimited_json = {
      }
    }
  }
  definition_id = "163ca2e9-2d14-4284-ac5e-975e40d11a3c"
  name          = "Betsy Mann"
  workspace_id  = var.workspace_id
}```
and I receive this:

```Error: unexpected response from API. Got an unexpected response code 400
│ 
│   with airbyte_destination_azure_blob_storage.my_destination_azureblobstorage,
│   on <http://main.tf|main.tf> line 28, in resource "airbyte_destination_azure_blob_storage" "my_destination_azureblobstorage":
│   28: resource "airbyte_destination_azure_blob_storage" "my_destination_azureblobstorage" {
│ 
│ **Request**:
│ POST /v1/destinations HTTP/1.1
│ Host: localhost:8006
│ Accept: application/json
│ Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==
│ Content-Type: application/json
│ User-Agent: speakeasy-sdk/go 0.4.1 2.262.2 1.0.0 airbyte
│ 
│ {"configuration":{"azure_blob_storage_account_key":"5KshpntyD2LQCjvZFRvxOBCHdI9KCACBzEx498ooFG0whlwQQ4eWaU/uQ6De1YgUmtEJPJu/EwvuPP3h37LWow==","azure_blob_storage_account_name":"datainfrarawstorageprod","azure_blob_storage_container_name":"ga4-airbyte","azure_blob_storage_endpoint_domain_name":"<http://blob.core.windows.net|blob.core.windows.net>","azure_blob_storage_output_buffer_size":5,"azure_blob_storage_spill_size":500,"destinationType":"azure-blob-storage","format":{"format_type":"JSONL"}},"definitionId":"163ca2e9-2d14-4284-ac5e-975e40d11a3c","name":"Betsy
│ Mann","workspaceId":"7024ffc9-4e59-4196-8206-127c89be6100"}
│ **Response**:
│ HTTP/1.1 400 Bad Request
│ Content-Length: 197
│ Connection: keep-alive
│ Content-Type: application/problem+json
│ Date: Tue, 20 Feb 2024 11:29:04 GMT
│ 
│ {"type":"<https://reference.airbyte.com/reference/errors#resource-not-found>","title":"resource-not-found","status":400,"detail":"Could
│ not find a resource for: 7024ffc9-4e59-4196-8206-127c89be6100"}```
So I tried putting the workspace id in the definition as well but got the same result. Anyone experienced this before? Are there any solutions?

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1708429183677569) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["terraform", "airbyte-destination", "api", "response-code-400", "resource-not-found"]
</sub>