Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Marketing connector expects field account_ids instead of single string account_id #77

Open
FinnGebauer opened this issue Feb 7, 2024 · 1 comment

Comments

@FinnGebauer
Copy link

FinnGebauer commented Feb 7, 2024

Description

It seems that since the Airbyte Facebook connector v1.3.0 (which allows for multiple ad account ids), the expectations of Terraform and Airbyte are not aligned anymore. Terraform only expects a field account_id while Airbyte expects a field account_ids. This is the case for v0.3.7 of the Terraform Airbyte Provider and v0.50.47 of Airbyte.

Airbyte Facebook Marketing Changelog

Steps to reproduce

  1. Create a new source for Facebook Marketing following the JSON schema provided by Terraform
    resource "airbyte_source_facebook_marketing" "my_source_facebook_marketing" { configuration = { access_token = "access_token" account_id = "account_id" source_type = "facebook-marketing" start_date = "2022-01-01T00:00:00Z" } name = "Facebook/Meta-Ads" workspace_id = "workspace_id" }

  2. Use terraform plan to get the planned updates

  3. Use terraform apply to apply the changes and receive the following error
    **Response**: │ HTTP/1.1 422 Unprocessable Entity │ Content-Length: 334 │ Connection: keep-alive │ Content-Type: application/problem+json │ Date: Wed, 07 Feb 2024 14:39:34 GMT │ Server: nginx/1.25.3 │ │ {"type":"https://reference.airbyte.com/reference/errors#unprocessable-entity","title":"unprocessable-entity","status":422,"detail":"The │ provided configuration does not fulfill the specification. Errors: json schema validation failed when comparing the data to the │ json schema. \nErrors: $.account_ids: is missing but it is required "}

@rshorser
Copy link

To add on to this, I tried setting account_ids as an array, but when I apply the plan, it returns an error Inappropriate value for attribute "configuration": attribute "account_id" is required. I tried setting both account_id and account_ids but that didn't work either. @FinnGebauer were you able to get a source setup using an array of account_ids? This is my config:

resource "airbyte_source_facebook_marketing" "facebook_source" { name = "FB Ads source" workspace_id = var.airbyte_workspace_id configuration = { access_token = var.facebook_token account_ids = ["12345","45677"] include_deleted = true start_date = "2021-01-25T00:00:00Z" } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants