airbytehq / terraform-provider-airbyte

Terraform Provider for Airbyte API
https://api.airbyte.com/
MIT License
49 stars 21 forks source link

[source-notion] `start_date` format problem #157

Open atomkirk opened 3 weeks ago

atomkirk commented 3 weeks ago

Connector Name

source-notion

Connector Version

3.0.6

What step the error happened?

Configuring a new connector

Relevant information

The docs say the start date should include seconds https://docs.airbyte.com/integrations/sources/notion

CleanShot 2024-10-22 at 07 23 40@2x

Relevant log output

However, when I try to create it with the following terraform, I get an error:

resource "airbyte_source_notion" "notion" {
  configuration = {
    credentials = {
      access_token = {
        token = data.google_secret_manager_secret_version.notion_api_key.secret_data
      }
    }
    start_date = "2024-01-01T00:00:00.000Z"
  }
  name         = "${local.shared}-notion-source"
  workspace_id = local.workspace_id
}

the error:

 {"status":422,"type":"https://reference.airbyte.com/reference/errors#unprocessable-entity","title":"unprocessable-entity","detail":"The
│ body of the request was not
│ understood","documentationUrl":null,"data":{"message":"json schema
│ validation failed when comparing the data to the json schema. \nErrors:
│ $.start_date: does not match the regex pattern
│ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$ "}}

As you can see my start date matches the regex, so why does't it accept it?

Contribute

marcosmarxm commented 3 weeks ago

The regex and the value you're using are correct. I tried running the call directly from the API and I was able to create a Notion source without problem. If you remove the start_date param are you able to create the connector?