Hey team, i’m trying to create a source in Airbyte...
# replication-ask-ai
s
Hey team, i’m trying to create a source in Airbyte OS using the terraform provider, running k8s using the helm chart. Port forwarding the
airbyte-webapp
to localhost:8080, I can go to the page and see the app without any sources, destinations or connections on version 0.50.17. In a new terraform folder, I have the
<http://provider.tf|provider.tf>
Copy code
terraform {
  required_providers {
    airbyte = {
      source  = "airbytehq/airbyte"
      version = "0.3.1"
    }
  }
}

provider "airbyte" {
  username = "airbyte"
  password = "password"
  server_url = "<http://localhost:8080/v1>"
}
I’ve defined a source in
<http://main.tf|main.tf>
as a test, after running
terraform plan
and
terraform apply
I get the following:
Copy code
**Request**:
│ POST /v1/sources HTTP/1.1
│ Host: localhost:8080
│ 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: Mon, 14 Aug 2023 13:05:45 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>
Can’t figure this one out, any help greatly appreciated
t
Hi Sahil, thanks for giving the terraform provider a try! There’s some information in the readme of the
airbyte-api-server
that could be helpful here: https://github.com/airbytehq/airbyte-platform/tree/main/airbyte-api-server. I think the issue you’re running into is that you are port forwarding and sending your requests to the webapp kube pod instead of the airbyte-api-server kube pod. I recommend trying to port forward with this command:
kubectl port-forward svc/airbyte-airbyte-api-server-svc 8006:80 &
and setting the server URL to
server_url = "<http://localhost:8006/v1/>"
. I would also recommend double checking that the airbyte-api-server pod is running. In the helm charts, the pod is configured as not enabled by default (we plan on changing the default to enabled soon). There’s more information in the readme to enable the airbyte-api-server pod. Let me know if those suggestions don’t resolve the issue!
s
Thanks Terence
i
Searching Slack I found a link to these docs. Changing server_url to
"http:localhost:8006/v1/"
worked.