Skip to content

Commit

Permalink
fix: source definition
Browse files Browse the repository at this point in the history
  • Loading branch information
aballiet committed Feb 29, 2024
1 parent aebfc47 commit 0ab71b1
Show file tree
Hide file tree
Showing 29 changed files with 472 additions and 261 deletions.
7 changes: 4 additions & 3 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: a592d325-751d-447c-af2a-581b9e706313
management:
docChecksum: 58e3f2e3f4c99cfda741aa5bddc01254
docChecksum: 7c83c37d0d3c4bd49001fc001a8219c3
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.272.7
releaseVersion: 1.2.1
configChecksum: 7549c420b8fee232a04e2823ed66bbaa
releaseVersion: 1.2.2
configChecksum: c0ce954a26e87fc81014a98f99cf4083
features:
terraform:
constsAndDefaults: 0.1.3
Expand Down Expand Up @@ -605,6 +605,7 @@ generatedFiles:
- internal/provider/type_dbt_cloud.go
- internal/provider/type_operator_webhook.go
- internal/provider/type_operator_configuration.go
- internal/provider/type_source_definition_create.go
- internal/provider/type_declarative_manifest.go
- internal/provider/type_declarative_source_manifest.go
- internal/provider/type_slack_notification_configuration.go
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# airbyte

<!-- Start SDK Installation -->
<!-- Start SDK Installation [installation] -->
## SDK Installation

To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`.
Expand All @@ -9,22 +9,21 @@ To install this provider, copy and paste this code into your Terraform configura
terraform {
required_providers {
airbyte = {
source = "aballiet/airbyte-oss"
version = "1.2.1"
source = "aballiet/airbyte"
version = "1.2.2"
}
}
}
provider "airbyte" {
# Must match your Airbyte server endpoint (airbyte-server-svc on k8s)
server_url = "http://localhost:8001/api/"
username = "YOUR_USERNAME"
password = "YOUR_PASSWORD"
# Configuration options
}
```
<!-- End SDK Installation -->
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

<!-- Start SDK Example Usage -->
### Testing the provider locally

Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.
Expand All @@ -41,11 +40,13 @@ cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```
<!-- End SDK Example Usage -->
<!-- End SDK Example Usage [usage] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

<!-- Start SDK Available Operations -->

<!-- End SDK Available Operations -->
<!-- End Available Resources and Operations [operations] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Connection DataSource

```terraform
data "airbyte_connection" "my_connection" {
connection_id = "0839cded-c24b-4e26-ba48-a24e9eaedfd4"
connection_id = "39cdedc2-4be2-46fa-88a2-4e9eaedfd401"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_destination.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Destination DataSource

```terraform
data "airbyte_destination" "my_destination" {
destination_id = "01e41ae1-e814-42cf-8767-202da61c2ec3"
destination_id = "e41ae1e8-142c-4fc7-a720-2da61c2ec391"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_destination_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DestinationDefinition DataSource

```terraform
data "airbyte_destination_definition" "my_destinationdefinition" {
destination_definition_id = "9100781f-2dad-4fe3-95f9-7cbac4a9fe32"
destination_definition_id = "00781f2d-adfe-4355-b97c-bac4a9fe32ed"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Operation DataSource

```terraform
data "airbyte_operation" "my_operation" {
operation_id = "ed2caaa8-6acf-4aeb-adc8-f85bcf425a69"
operation_id = "2caaa86a-cfae-4bad-88f8-5bcf425a69f8"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Source DataSource

```terraform
data "airbyte_source" "my_source" {
source_id = "f844cbc0-7f65-4e5d-9847-8196e36f66cd"
source_id = "44cbc07f-65e5-4d18-8781-96e36f66cd38"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_source_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SourceDefinition DataSource

```terraform
data "airbyte_source_definition" "my_sourcedefinition" {
source_definition_id = "38de26a5-5755-4871-91c3-16fa6ed0923b"
source_definition_id = "de26a557-5587-4111-8316-fa6ed0923bff"
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/airbyte_source_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ SourceSchema DataSource

```terraform
data "airbyte_source_schema" "my_sourceschema" {
connection_id = "ff392053-3529-44d0-addf-f687ccb9e13e"
connection_id = "39205335-294d-40ad-9ff6-87ccb9e13e7b"
disable_cache = true
notify_schema_change = true
source_id = "a5e59828-7a0d-4455-b838-3a0345516193"
source_id = "e598287a-0d45-4578-b83a-0345516193a2"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/airbyte_workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Workspace DataSource

```terraform
data "airbyte_workspace" "my_workspace" {
workspace_id = "a20e3344-987d-4e77-90fb-df6188b86c7c"
workspace_id = "0e334498-7de7-4710-bbdf-6188b86c7c05"
}
```

Expand Down
114 changes: 91 additions & 23 deletions docs/resources/airbyte_source_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,35 @@ SourceDefinition Resource

```terraform
resource "airbyte_source_definition" "my_sourcedefinition" {
cpu_limit = "...my_cpu_limit..."
cpu_request = "...my_cpu_request..."
docker_image_tag = "...my_docker_image_tag..."
docker_repository = "...my_docker_repository..."
documentation_url = "http://jam-packed-guarantee.com"
icon = "...my_icon..."
job_type = "connection_updater"
memory_limit = "...my_memory_limit..."
memory_request = "...my_memory_request..."
name = "Garrett Kirlin"
scope_id = "0b17eae1-dd9c-4435-827c-42c7cd806319"
scope_type = "workspace"
workspace_id = "46c84086-3d9d-4143-8d46-88b60221d5f1"
scope_id = "6761ccc7-d20b-417e-ae1d-d9c435027c42"
scope_type = "organization"
source_definition = {
docker_image_tag = "...my_docker_image_tag..."
docker_repository = "...my_docker_repository..."
documentation_url = "http://specific-stretch.name"
icon = "...my_icon..."
name = "Ms. Gertrude Ernser II"
resource_requirements = {
default = {
cpu_limit = "...my_cpu_limit..."
cpu_request = "...my_cpu_request..."
memory_limit = "...my_memory_limit..."
memory_request = "...my_memory_request..."
}
job_specific = [
{
job_type = "discover_schema"
resource_requirements = {
cpu_limit = "...my_cpu_limit..."
cpu_request = "...my_cpu_request..."
memory_limit = "...my_memory_limit..."
memory_request = "...my_memory_request..."
}
},
]
}
}
workspace_id = "c840863d-9d14-434d-8688-b60221d5f140"
}
```

Expand All @@ -35,27 +51,23 @@ resource "airbyte_source_definition" "my_sourcedefinition" {

### Required

- `docker_image_tag` (String)
- `docker_repository` (String) Requires replacement if changed.
- `documentation_url` (String) Requires replacement if changed.
- `job_type` (String) enum that describes the different types of jobs that the platform runs. Requires replacement if changed. ; must be one of ["get_spec", "check_connection", "discover_schema", "sync", "reset_connection", "connection_updater", "replicate"]
- `name` (String) Requires replacement if changed.
- `source_definition` (Attributes) Requires replacement if changed. (see [below for nested schema](#nestedatt--source_definition))

### Optional

- `cpu_limit` (String) Requires replacement if changed.
- `cpu_request` (String) Requires replacement if changed.
- `icon` (String) Requires replacement if changed.
- `memory_limit` (String) Requires replacement if changed.
- `memory_request` (String) Requires replacement if changed.
- `scope_id` (String) Requires replacement if changed.
- `scope_type` (String) Requires replacement if changed. ; must be one of ["workspace", "organization"]
- `workspace_id` (String) Requires replacement if changed.

### Read-Only

- `custom` (Boolean) Whether the connector is custom or not
- `docker_image_tag` (String)
- `docker_repository` (String)
- `documentation_url` (String)
- `icon` (String)
- `max_seconds_between_messages` (Number) Number of seconds allowed between 2 airbyte protocol messages. The source will timeout if this delay is reach
- `name` (String)
- `protocol_version` (String) The Airbyte Protocol version supported by the connector
- `release_date` (String) The date when this connector was first released, in yyyy-mm-dd format.
- `release_stage` (String) must be one of ["alpha", "beta", "generally_available", "custom"]
Expand All @@ -64,6 +76,62 @@ resource "airbyte_source_definition" "my_sourcedefinition" {
- `source_type` (String) must be one of ["api", "file", "database", "custom"]
- `support_level` (String) must be one of ["community", "certified", "none"]

<a id="nestedatt--source_definition"></a>
### Nested Schema for `source_definition`

Required:

- `docker_image_tag` (String) Requires replacement if changed.
- `docker_repository` (String) Requires replacement if changed.
- `documentation_url` (String) Requires replacement if changed.
- `name` (String) Requires replacement if changed.

Optional:

- `icon` (String) Requires replacement if changed.
- `resource_requirements` (Attributes) actor definition specific resource requirements. if default is set, these are the requirements that should be set for ALL jobs run for this actor definition. it is overriden by the job type specific configurations. if not set, the platform will use defaults. these values will be overriden by configuration at the connection level. Requires replacement if changed. (see [below for nested schema](#nestedatt--source_definition--resource_requirements))

<a id="nestedatt--source_definition--resource_requirements"></a>
### Nested Schema for `source_definition.resource_requirements`

Optional:

- `default` (Attributes) optional resource requirements to run workers (blank for unbounded allocations). Requires replacement if changed. (see [below for nested schema](#nestedatt--source_definition--resource_requirements--default))
- `job_specific` (Attributes List) Requires replacement if changed. (see [below for nested schema](#nestedatt--source_definition--resource_requirements--job_specific))

<a id="nestedatt--source_definition--resource_requirements--default"></a>
### Nested Schema for `source_definition.resource_requirements.default`

Optional:

- `cpu_limit` (String) Requires replacement if changed.
- `cpu_request` (String) Requires replacement if changed.
- `memory_limit` (String) Requires replacement if changed.
- `memory_request` (String) Requires replacement if changed.


<a id="nestedatt--source_definition--resource_requirements--job_specific"></a>
### Nested Schema for `source_definition.resource_requirements.job_specific`

Required:

- `job_type` (String) enum that describes the different types of jobs that the platform runs. Requires replacement if changed. ; must be one of ["get_spec", "check_connection", "discover_schema", "sync", "reset_connection", "connection_updater", "replicate"]
- `resource_requirements` (Attributes) optional resource requirements to run workers (blank for unbounded allocations). Requires replacement if changed. (see [below for nested schema](#nestedatt--source_definition--resource_requirements--job_specific--resource_requirements))

<a id="nestedatt--source_definition--resource_requirements--job_specific--resource_requirements"></a>
### Nested Schema for `source_definition.resource_requirements.job_specific.resource_requirements`

Optional:

- `cpu_limit` (String) Requires replacement if changed.
- `cpu_request` (String) Requires replacement if changed.
- `memory_limit` (String) Requires replacement if changed.
- `memory_request` (String) Requires replacement if changed.





<a id="nestedatt--resource_requirements"></a>
### Nested Schema for `resource_requirements`

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/airbyte_source_definition_manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ resource "airbyte_source_definition_manifest" "my_sourcedefinitionmanifest" {
description = "...my_description..."
manifest = {}
spec = {}
version = 3
version = 1
}
set_as_active_manifest = true
source_definition_id = "2c7e2666-964b-41e5-8ee0-38120ec22ac9"
workspace_id = "78dbe310-dc62-4194-b112-ed73d68ab928"
source_definition_id = "7e266696-4b1e-454e-a038-120ec22ac978"
workspace_id = "dbe310dc-6219-44f1-92ed-73d68ab9280e"
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/airbyte_workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ resource "airbyte_workspace" "my_workspace" {
anonymous_data_collection = true
default_geography = "eu"
display_setup_wizard = true
email = "Santa_Maggio@hotmail.com"
name = "Penny Padberg"
email = "Helene54@yahoo.com"
name = "Hector Gibson"
news = true
organization_id = "e276dd0a-b8d0-496c-a3af-1300de2cba92"
organization_id = "76dd0ab8-d096-4c23-af13-00de2cba9260"
security_updates = false
}
```
Expand Down
2 changes: 1 addition & 1 deletion examples/data-sources/airbyte_connection/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_connection" "my_connection" {
connection_id = "0839cded-c24b-4e26-ba48-a24e9eaedfd4"
connection_id = "39cdedc2-4be2-46fa-88a2-4e9eaedfd401"
}
2 changes: 1 addition & 1 deletion examples/data-sources/airbyte_destination/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_destination" "my_destination" {
destination_id = "01e41ae1-e814-42cf-8767-202da61c2ec3"
destination_id = "e41ae1e8-142c-4fc7-a720-2da61c2ec391"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_destination_definition" "my_destinationdefinition" {
destination_definition_id = "9100781f-2dad-4fe3-95f9-7cbac4a9fe32"
destination_definition_id = "00781f2d-adfe-4355-b97c-bac4a9fe32ed"
}
2 changes: 1 addition & 1 deletion examples/data-sources/airbyte_operation/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_operation" "my_operation" {
operation_id = "ed2caaa8-6acf-4aeb-adc8-f85bcf425a69"
operation_id = "2caaa86a-cfae-4bad-88f8-5bcf425a69f8"
}
2 changes: 1 addition & 1 deletion examples/data-sources/airbyte_source/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_source" "my_source" {
source_id = "f844cbc0-7f65-4e5d-9847-8196e36f66cd"
source_id = "44cbc07f-65e5-4d18-8781-96e36f66cd38"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_source_definition" "my_sourcedefinition" {
source_definition_id = "38de26a5-5755-4871-91c3-16fa6ed0923b"
source_definition_id = "de26a557-5587-4111-8316-fa6ed0923bff"
}
4 changes: 2 additions & 2 deletions examples/data-sources/airbyte_source_schema/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data "airbyte_source_schema" "my_sourceschema" {
connection_id = "ff392053-3529-44d0-addf-f687ccb9e13e"
connection_id = "39205335-294d-40ad-9ff6-87ccb9e13e7b"
disable_cache = true
notify_schema_change = true
source_id = "a5e59828-7a0d-4455-b838-3a0345516193"
source_id = "e598287a-0d45-4578-b83a-0345516193a2"
}
2 changes: 1 addition & 1 deletion examples/data-sources/airbyte_workspace/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "airbyte_workspace" "my_workspace" {
workspace_id = "a20e3344-987d-4e77-90fb-df6188b86c7c"
workspace_id = "0e334498-7de7-4710-bbdf-6188b86c7c05"
}
Loading

0 comments on commit 0ab71b1

Please sign in to comment.