-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Top line... I get an error when I try to make any change to an existing airbyte_declarative_source_definition
https://registry.terraform.io/providers/airbytehq/airbyte/latest/docs/resources/declarative_source_definition
- Able to create one fine
- Any change to the manifest causes this error...
Latest thought:
https://registry.terraform.io/providers/airbytehq/airbyte/0.12.0/docs/resources/declarative_source_definition
Is this a breaking change from 0.12.0
in this build the version
field on declarative_source_definition
was optional?
In 0.13.0
it is read-only
Maybe i'll try going back a version...
Anyway my Airbyte is installed via helm
:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: airbyte
namespace: argo-cd
spec:
project: tools
sources:
- chart: airbyte
repoURL: https://airbytehq.github.io/helm-charts
targetRevision: 1.6.0
helm:
My terraform provider is:
terraform {
required_providers {
airbyte = {
source = "airbytehq/airbyte"
version = "~> 0.13.0"
}
}
}
│ Error: failure to invoke API
│
│ with module.airbyte.airbyte_declarative_source_definition.private_liam,
│ on ../../modules/airbyte/main.tf line 55, in resource "airbyte_declarative_source_definition" "private_liam":
│ 55: resource "airbyte_declarative_source_definition" "private_liam" {
│
│ unknown status code returned: Status 500
│ {"status":500,"type":"https://reference.airbyte.com/reference/errors","title":"unexpected-problem","detail":"An
│ unexpected problem has occurred. If this is an error that needs to be addressed, please submit a pull request or
│ github issue.","documentationUrl":null,"data":{"message":"Cannot invoke \"java.lang.Long.longValue()\" because the
│ return value of \"io.airbyte.api.model.generated.DeclarativeSourceManifest.getVersion()\" is null"}}
Here is my definition:
resource "airbyte_declarative_source_definition" "privatei_liam" {
name = "Liam Test"
workspace_id = var.airbyte_workspace_id
manifest = jsonencode(yamldecode(templatefile(
"${path.module}/builder/private_source.yml.tftpl",
{
PRIVATE_USERNAME = var.private_connector_username,
PRIVATE_CLIENT_ID = var.private_connector_client_id,
PRIVATE_CLIENT_SECRET = var.private_connector_client_secret,
PRIVATE_PASSWORD = var.private_connector_password
}
)))
}
The initial terraform apply
works! UI Looks good...
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
+ create
Terraform will perform the following actions:
# module.airbyte.airbyte_declarative_source_definition.private_liam will be created
+ resource "airbyte_declarative_source_definition" "private_liam" {
+ id = (known after apply)
+ manifest = (sensitive value)
+ name = "Liam Test"
+ version = (known after apply)
+ workspace_id = "6a692720-89da-4ab2-bf68-df0815b1a464"
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions in workspace "data-pipeline-ims-sandbox"?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.airbyte.airbyte_declarative_source_definition.private_liam: Creating...
module.airbyte.airbyte_declarative_source_definition.private_liam: Creation complete after 1s [id=b423575c-c893-4762-9b4a-2ce424421802]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Success!
Ok then I make a trivial change adding an extra character to the base_url
of the custom source definition...
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# module.airbyte.airbyte_declarative_source_definition.private_liam will be updated in-place
~ resource "airbyte_declarative_source_definition" "private_liam" {
~ id = "b423575c-c893-4762-9b4a-2ce424421802" -> (known after apply)
~ manifest = (sensitive value)
name = "Liam Test"
~ version = 1 -> (known after apply)
# (1 unchanged attribute hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions in workspace "data-pipeline-ims-sandbox"?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
module.airbyte.airbyte_declarative_source_definition.private_liam: Modifying... [id=b423575c-c893-4762-9b4a-2ce424421802]
╷
│ Error: failure to invoke API
│
│ with module.airbyte.airbyte_declarative_source_definition.private_liam,
│ on ../../modules/airbyte/main.tf line 55, in resource "airbyte_declarative_source_definition" "private_liam":
│ 55: resource "airbyte_declarative_source_definition" "private_liam" {
│
│ unknown status code returned: Status 500
│ {"status":500,"type":"https://reference.airbyte.com/reference/errors","title":"unexpected-problem","detail":"An
│ unexpected problem has occurred. If this is an error that needs to be addressed, please submit a pull request or
│ github issue.","documentationUrl":null,"data":{"message":"Cannot invoke \"java.lang.Long.longValue()\" because the
│ return value of \"io.airbyte.api.model.generated.DeclarativeSourceManifest.getVersion()\" is null"}}
╵
Releasing state lock. This may take a few moments...
liamconsidine@CQQ27KJ4GL dev %
The manifest JSON has a version field within it 6.41.5