<@U04S8PLJWMT> I took this error when tried to pro...
# ask-ai
r
@kapa.ai I took this error when tried to provision databricks destination using terraform:
Copy code
Error: failure to invoke API
 │
 │  with airbyte_destination_databricks.databricks,
 │  on main.tf line 1, in resource "airbyte_destination_databricks" "databricks":
 │  1: resource "airbyte_destination_databricks" "databricks" {
 │
 │ failed to get token: unexpected status code: 405: <html>
 │ <head><title>405 Not Allowed</title></head>
 │ <body>
 │ <center><h1>405 Not Allowed</h1></center>
 │ <hr><center>nginx/1.27.3</center>
 │ </body>
 │ </html>
k
A 405 Not Allowed during “failed to get token” usually means the Terraform provider can’t reach the correct Airbyte token endpoint (method/path mismatch), so authentication fails before creating the Databricks destination. Checklist to fix: - Use the correct base URL for your Airbyte API: - Airbyte Cloud: POST https://api.airbyte.com/api/v1/applications/token (the provider handles this if you just set client_id/client_secret). [[API access](https://docs.airbyte.com/platform/using-airbyte/configuring-api-access)] - Airbyte Self-Managed (OSS/Enterprise): POST <YOUR_WEBAPP_URL>/api/v1/applications/token. For public API calls, the base is <YOUR_WEBAPP_URL>/api/public/v1/. Requests should go to the webapp URL, not directly to the server pod. [[API access](https://docs.airbyte.com/platform/using-airbyte/configuring-api-access); [Discussion note](https://github.com/airbytehq/airbyte/discussions/49937)] - Configure the Terraform provider with client_id/client_secret and (for self-managed) server_url pointing to the public API: - Example provider block (version may differ):
Copy code
terraform {       required_providers {         airbyte = {           source  = "airbytehq/airbyte"           version = "0.6.5"         }       }     }      provider "airbyte" {       client_id     = var.client_id       client_secret = var.client_secret       # For local/self-managed, include your webapp base + /api/public/v1/       server_url    = "http://localhost:8000/api/public/v1/"     }
[[Step 1 setup](https://docs.airbyte.com/platform/next/terraform-documentation#step-1-set-up-the-terraform-provider)] - Ensure your Application exists and credentials are valid (Settings → Applications), and that your environment can reach the endpoint. [[API access](https://docs.airbyte.com/platform/using-airbyte/configuring-api-access)] - If you’re on Airbyte Enterprise, note tokens are short-lived; the provider handles refreshing when client credentials are set. [[API access](https://docs.airbyte.com/platform/1.7/enterprise-setup/api-access-config)] Once auth succeeds, configure the Databricks destination per docs (Unity Catalog required; OAuth supported on AWS, use access token on GCP). [[Databricks destination](https://docs.airbyte.com/integrations/destinations/databricks)] If after pointing server_url to /api/public/v1/ you still get 405, the knowledge sources don’t provide additional troubleshooting steps specific to this error. In that case, please share your provider block (redact secrets) and whether you are using Cloud or Self-Managed so we can pinpoint the URL/method mismatch.
r
Now I took this error @kapa.ai : Error: failure to invoke API │ │ with airbyte_destination_databricks.databricks, │ on main.tf line 1, in resource "airbyte_destination_databricks" "databricks": │ 1: resource "airbyte_destination_databricks" "databricks" { │ │ unknown status code returned: Status 404 │ {"status":404,"type":"https://reference.airbyte.com/reference/errors#resource-not-found","title":"resource-not-found","detail":"The │ requested resource could not be │ found.","documentationUrl":null,"data":{"resourceType":"STANDARD_DESTINATION_DEFINITION","resourceId":"fb6a88f5-a304-46f5-ab8b-4280a6d91f99"}}
k
A message from kapa.ai
The 404 indicates the Databricks destination definition ID you’re referencing isn’t found by the Airbyte API in your workspace/instance: - resourceType: STANDARD_DESTINATION_DEFINITION - resourceId: fb6a88f5-a304-46f5-ab8b-4280a6d91f99 This usually happens when: - The connector definition isn’t present or available in your deployment/region. - The Terraform resource or module is pointing to an outdated or wrong definition_id. - You’re on self-managed and the catalog hasn’t been seeded with that definition/version. What to do: 1) Verify the correct definition ID for Databricks in your environment. - If you’re using the generic/custom destination resource, use a definition_id that exists in your workspace. The docs show using airbyte_destination_custom with a known definition_id or strongly-typed resources for supported destinations. [[Step 3: destination](https://docs.airbyte.com/platform/terraform-documentation#step-3-create-a-destination)] 2) Prefer the strongly-typed resource if available. - For BigQuery, there’s a dedicated airbyte_destination_bigquery resource; the same pattern applies for other destinations when supported. Using the typed resource avoids manual definition_id handling. [[Step 3: destination](https://docs.airbyte.com/platform/1.7/terraform-documentation#step-3-create-a-destination)] 3) If you must use a custom/definition_id flow, fetch the correct ID from your environment. - A known issue pattern with ClickHouse showed that relying on hardcoded IDs led to older or missing definitions; the recommended approach was to use the published Terraform modules or ensure the definition exists in the environment. [[ClickHouse issue](https://github.com/airbytehq/airbyte/issues/63353)] 4) If the definition truly doesn’t exist in your instance: - On self-managed, add or update destination definitions via the public APIs (you can create custom destination definitions; you cannot modify public ones). [[Release notes 1.6](https://docs.airbyte.com/release_notes/v-1.6#create-custom-connectors-from-yaml-or-docker-images-using-the-api-and-terraform)] If you share: - Whether you’re on Cloud or self-managed, - The exact Terraform resource you’re using (typed vs custom) and the definition_id source, I can suggest the precise next command or code snippet to pull the valid Databricks definition ID for your setup.