Summary
When trying to create a REST API connector through Terraform, encountering an unknown status code 422 with an error message indicating ‘unprocessable-entity’. The provided configuration seems to be correct. Need assistance in resolving this issue.
Question
Hello. I am trying to create REST API connector throu terraform. On UI it works like a charm but when trying to create throu terraform i am getting :
unknown status code returned: Status 422 {"status":422,"type":"<https://reference.airbyte.com/reference/errors#unprocessable-entity>","title":"unprocessable-entity","detail":"The body of the request was notunderstood","documentationUrl":null,"data":null}
This is my config.What i am missing ? :
name = "Custom JSONPlaceholder Source"
workspace_id = var.airbyte_workspace_id # Your Airbyte workspace ID
configuration = jsonencode({
url = "<https://jsonplaceholder.typicode.com>",
http_method = "GET",
path = "/posts",
headers = {
"User-Agent" = "python-requests/2.32.3", # Example header
"Accept" = "*/*" # Example header
},
body = jsonencode({}), # No body for GET requests
primary_key = ["id"],
pagination_type = "None"
})
}```
<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/p1729245827706689) if you want
to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["rest-api-connector", "terraform", "status-422", "unprocessable-entity", "airbyte-source-custom"]
</sub>