terraform-provider-airbyte
terraform-provider-airbyte copied to clipboard
Issue when creating new workspace (ID)
Description When using the Terraform Airbyte Provider (v0.3.7) to create a new workspace (ID) with the AirByte Version "v0.50.47", there seems to be a problem to access the new workspace through the localhost interface. The workspace-ID can be found in the terraform state, and via the REST-API. It was possible to resolve this issue, when setting manually via the REST-API an organization-ID.
Steps to Reproduce
- Use the Terraform Airbyte Provider (v0.3.7) to create a new workspace.
resource "airbyte_workspace" "my_workspace" {
name = "test"
}
output "terraform_workspace_id" {
value = airbyte_workspace.my_workspace.workspace_id
}
- Get the workspace-ID via the Terraform state
terraform state show airbyte_workspace.my_workspace
-
Move to
localhost:8000
and login. -
Try to navigate to
http://localhost:8000/workspaces/{workspace_id_from_terraform_state}
--> this should not work
Current "solution", setting the organization_id via:
import requests
url = "http://localhost:8000/api/v1/workspaces/update_organization"
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic {auth_token}"
}
payload = {
"workspaceId": "{workspace_id_from_terraform_state}",
"organizationId": '00000000-0000-0000-0000-000000000000'
}
response = requests.post(url, json=payload, headers=headers)
You should be able to access:
http://localhost:8000/workspaces/{workspace_id_from_terraform_state}
With Terraform Airbyte Provider (v0.3.4) and the AirByte Version "v0.50.33", it was possible to get the workspace_id from the terraform state and access it directly via the localhost workspaces.
Ideally it would be possible to directly see all possible workspaces in the Interface or recover the state in order to type in manually the workspace ID.
I'm amazed this hasn't been answered already, have the same issue