Idris Osman
08/15/2023, 10:59 AM405 Not Allowed error -- any help will be greatly appreciated.
Setup Flow
Setup Airbyte locally(Linux & Docker Desktop) following guide, which works fine.
# clone Airbyte from GitHub
git clone <https://github.com/airbytehq/airbyte.git>
# switch into Airbyte directory
cd airbyte
# start Airbyte
./run-ab-platform.sh
Set up terraform using the Airbyte Terraform Provider setup guide.
main.tf
terraform {
required_providers {
airbyte = {
source = "airbytehq/airbyte"
version = "0.3.1"
}
}
}
provider "airbyte" {
username = "airbyte"
password = "password"
server_url = "<http://localhost:8000>"
}
resource "airbyte_source_stripe" "my_source_stripe" {
configuration = {
sourceType = "stripe"
account_id = "acct_123"
client_secret = "sklive_abc"
start_date = "2023-07-01T00:00:00Z"
lookback_window_days = 0
slice_range = 365
}
name = "Stripe"
workspace_id = "cfe713f3-d6cf-4152-94b4-f2b21f3e7153"}
After which I ran the terraform plan and terraform apply commands which results in the following error
Error
│ Error: unexpected response from API. Got an unexpected response code 405
│
│ with airbyte_source_stripe.my_source_stripe,
│ on <http://main.tf|main.tf> line 18, in resource "airbyte_source_stripe" "my_source_stripe":
│ 18: resource "airbyte_source_stripe" "my_source_stripe" {
│
│ **Request**:
│ POST /sources HTTP/1.1
│ Host: localhost:8000
│ Accept: application/json
│ Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==
│ Content-Type: application/json
│ User-Agent: speakeasy-sdk/terraform 0.3.1 2.83.3 1.0.0
│
│
│ **Response**:
│ HTTP/1.1 405 Not Allowed
│ Transfer-Encoding: chunked
│ Connection: keep-alive
│ Content-Type: text/html
│ Date: Tue, 15 Aug 2023 10:45:56 GMT
│ Server: nginx/1.25.1
│
│ 115
│ <html>
│ <head><title>405 Not Allowed</title><script data-script="config-overwrites">
│ window.TRACKING_STRATEGY = "segment";
│ </script></head>
│ <body>
│ <center><h1>405 Not Allowed</h1></center>
│ <hr><center>nginx/1.25.1</center>
│ </body>
│ </html>kapa.ai
08/15/2023, 10:59 AM405 Not Allowed error when trying to use the Airbyte Terraform Provider. This error typically indicates that the HTTP method you're trying to use is not allowed by the server. However, the extracts do not provide specific information on how to resolve this issue with the Airbyte Terraform Provider. It's possible that there might be a mismatch between the API endpoints expected by the Terraform Provider and those provided by your local Airbyte instance. I recommend checking the following: 1. Ensure that your Airbyte instance is running and accessible at the server_url you specified in your Terraform configuration. 2. Verify that the Airbyte version you're running locally is compatible with the version of the Airbyte Terraform Provider you're using. 3. Check the Airbyte [API documentation](https://docs.airbyte.com/understanding-airbyte/api) to ensure the endpoints and methods align with those expected by the Terraform Provider. If the issue persists, I recommend reaching out to the Airbyte community on [Slack](https://airbytehq.slack.com) or [GitHub](https://github.com/airbytehq/airbyte) for further assistance.Idris Osman
08/16/2023, 7:59 AMAirbyte_api_server is present in the docker_compose.yaml file. The following url can be used as the server_url in the terraform provider <http://localhost:8006/v1/> .