Skip to content

Commit 4352fad

Browse files
author
AJ Steers
committed
add singer log dir
1 parent 20c8dc6 commit 4352fad

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed

Diff for: catalog/aws/singer-taps/main.tf

+14-12
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,24 @@ module "ecs_cluster" {
6262
}
6363

6464
module "ecs_tap_sync_task" {
65-
count = length(local.taps_specs)
66-
source = "../../../components/aws/ecs-task"
67-
name_prefix = "${local.name_prefix}task${count.index}-"
68-
environment = var.environment
69-
resource_tags = var.resource_tags
70-
ecs_cluster_name = module.ecs_cluster.ecs_cluster_name
71-
container_image = local.taps_specs[count.index].image
72-
container_command = local.taps_specs[count.index].sync_command
73-
container_ram_gb = var.container_ram_gb
74-
container_num_cores = var.container_num_cores
75-
use_private_subnet = var.use_private_subnet
76-
use_fargate = true
65+
count = length(local.taps_specs)
66+
source = "../../../components/aws/ecs-task"
67+
name_prefix = "${local.name_prefix}task${count.index}-"
68+
environment = var.environment
69+
resource_tags = var.resource_tags
70+
ecs_cluster_name = module.ecs_cluster.ecs_cluster_name
71+
container_image = local.taps_specs[count.index].image
72+
container_command = local.taps_specs[count.index].sync_command
73+
container_ram_gb = var.container_ram_gb
74+
container_num_cores = var.container_num_cores
75+
use_private_subnet = var.use_private_subnet
76+
use_fargate = true
77+
permitted_s3_buckets = local.needed_s3_buckets
7778
environment_vars = merge(
7879
{
7980
TAP_CONFIG_DIR = "${var.data_lake_metadata_path}/tap-snapshot-${local.unique_hash}",
8081
TAP_STATE_FILE = "${coalesce(var.data_lake_storage_path, var.data_lake_metadata_path)}/${var.state_file_naming_scheme}",
82+
TAP_LOG_DIR = "${var.data_lake_logging_path}/tap-${local.taps_specs[count.index].name}/",
8183
PIPELINE_VERSION_NUMBER = var.pipeline_version_number
8284
"${local.tap_env_prefix[count.index]}CONFIG_FILE" = "False" # Config will be passed via env vars
8385
"${local.target_env_prefix}CONFIG_FILE" = "False" # Config will be passed via env vars

Diff for: catalog/aws/singer-taps/s3-path-parsing.tf

+5
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ locals {
1010
)),
1111
replace(var.data_file_naming_scheme, "{file}", "")
1212
])
13+
needed_s3_buckets = distinct(flatten([
14+
var.data_lake_storage_path == null ? [] : [split("/", split("//", var.data_lake_storage_path)[1])[0]],
15+
var.data_lake_logging_path == null ? [] : [split("/", split("//", var.data_lake_logging_path)[1])[0]],
16+
var.data_lake_metadata_path == null ? [] : [split("/", split("//", var.data_lake_metadata_path)[1])[0]],
17+
]))
1318
}

Diff for: catalog/aws/singer-taps/variables.tf

+7
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ variable "data_lake_type" {
101101
description = "Specify `S3` if loading to an S3 data lake, otherwise leave blank."
102102
default = null
103103
}
104+
variable "data_lake_logging_path" {
105+
description = <<EOF
106+
The remote folder for storing tap execution logs and log artifacts.
107+
Currently only S3 paths (s3://...) are supported.
108+
EOF
109+
type = string
110+
}
104111
variable "data_lake_metadata_path" {
105112
description = <<EOF
106113
The remote folder for storing tap definitions files.

0 commit comments

Comments
 (0)