-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
35 lines (29 loc) · 971 Bytes
/
main.tf
File metadata and controls
35 lines (29 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
data "http" "airbyte_workspaces" {
url = "${var.SERVER_URL}/v1/workspaces"
method = "POST"
request_headers = {
Authorization = "Basic YWlyYnl0ZTpwYXNzd29yZA=="
}
}
module "s3_source" {
source = "./sources/s3"
for_each = local.s3
configuration = each.value.configuration
source_name = each.key
workspace_id = local.workspace_id
}
module "bigquery_destination" {
source = "./destinations/bigquery"
workspace_id = local.big_query.workspace_id
source_name = local.big_query.name
configuration = local.big_query.configuration
}
module "connections" {
source = "./connections"
for_each = local.connections[trimprefix(terraform.workspace, "cne-airbyte-template-")]
destination_id = each.value.destination_id
name = each.key
namespace_definition = each.value.namespace_definition
namespace_format = lookup(each.value, "namespace_format", null)
source_id = each.value.source_id
}