Hello! I’m having trouble deploying a Zendesk Supp...
# help-api-cli-orchestration
e
Hello! I’m having trouble deploying a Zendesk Support source using the Terraform Provider. The problem seems to happen when using the
source_zendesk_support_authentication_api_token
nested field of the credentials field (available in the docs). When applying a Terraform code that uses it, the API gets an unexpected response code 422, with the details that read:
Copy code
{"type":"<https://reference.airbyte.com/reference/errors#unprocessable-entity>","status":422,"title":"unprocessable-entity","detail":"The provided
configuration does not fulfill the specification. Errors: json schema validation failed when comparing the data to the json schema. \nErrors: $.credentials:
null found, object expected, $.credentials: null found, object expected "}
Looks like that the parser sets the credentials field to
null
when I’m using this field, as shown in the API payload that generated the above response:
Copy code
{
  "configuration": {
    "credentials": null,
    "ignore_pagination": true,
    "sourceType": "zendesk-support",
    "start_date": "2023-01-01T00:00:00Z",
    "subdomain": "[REDACTED]"
  },
  "name": "airbyte.zendesk-support",
  "workspaceId": "[REDACTED]"
}
When using a different field like
source_zendesk_support_update_authentication_api_token
(available it this doc), the error does not occur. Even though, while the source is created, the credentials are not, resulting in a source created without any Authentication fields, as seen in the print-screen attached. The Terraform code I’m using is
Copy code
resource "airbyte_source_zendesk_support" "source_zendesk_support" {
  name          = "airbyte.zendesk-support"
  workspace_id  = var.workspace_id

  configuration = {
    source_type       = "zendesk-support"
    subdomain         = var.zendesk["subdomain"]
    start_date        = "2023-01-01T00:00:00Z"
    ignore_pagination = true
    credentials = {
      source_zendesk_support_authentication_api_token = {
        credentials = "api_token"
        api_token   = var.zendesk["api_token"]
        email       = var.zendesk["email"]
      }
    }
  }
}
j
1. Did you try to test the connection on Airbyte? 2. I managed to get it working by first deploying without any credentials and only adding credentials on the 2nd deploy
l
Hello! Did you manage to get it working fully with Terraform ? I have the same issue.
e
Hi @Louis Auneau, sorry for the long delay. I had no progress getting it to work. I’ve made many tests and they all signaled for the problem really being at the
source_zendesk_support_authentication_api_token
field parsing. Due to this issue we’ve decided to postpone deploying resources using Terraform for now, so I had no chance to check the Airbyte Zendesk Support go file after potential bugs. @Justas Černas thanks for your reply! The connection doesn’t work when the source is deployed with no credentials, but it does when credentials are set manually, therefore the problem remains. Regarding deploying in two stages, we currently apply Terraform changes through automated CI/CD pipelines, so we would not have a moment for manual interaction where we’d be able to apply them twice (first without credentials and then with them). In our case it should be successfully deployed at the first attempt.