Skip to content

Commit 5b2d8b2

Browse files
authored
Merge pull request #840 from NHSDigital/feature/jale13-nrl-1288-reporting-allow-multiple-log-groups
NRL 1288/1304 Reporting allow multiple log groups
2 parents 57c177f + 589a5ae commit 5b2d8b2

File tree

6 files changed

+3506
-310
lines changed

6 files changed

+3506
-310
lines changed

terraform/account-wide-infrastructure/modules/glue/glue.tf

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create Glue Data Catalog Database
22
resource "aws_glue_catalog_database" "log_database" {
33
name = "${var.name_prefix}-reporting"
4-
location_uri = "${aws_s3_bucket.target-data-bucket.id}/logs/"
4+
location_uri = "${aws_s3_bucket.target-data-bucket.id}/"
55
}
66

77
# Create Glue Crawler
@@ -10,7 +10,37 @@ resource "aws_glue_crawler" "log_crawler" {
1010
database_name = aws_glue_catalog_database.log_database.name
1111
role = aws_iam_role.glue_service_role.name
1212
s3_target {
13-
path = "${aws_s3_bucket.target-data-bucket.id}/logs/"
13+
path = "${aws_s3_bucket.target-data-bucket.id}/consumer_countDocumentReference/"
14+
}
15+
s3_target {
16+
path = "${aws_s3_bucket.target-data-bucket.id}/consumer_readDocumentReference/"
17+
}
18+
s3_target {
19+
path = "${aws_s3_bucket.target-data-bucket.id}/consumer_searchDocumentReference/"
20+
}
21+
s3_target {
22+
path = "${aws_s3_bucket.target-data-bucket.id}/consumer_searchPostDocumentReference/"
23+
}
24+
s3_target {
25+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_createDocumentReference/"
26+
}
27+
s3_target {
28+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_deleteDocumentReference/"
29+
}
30+
s3_target {
31+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_readDocumentReference/"
32+
}
33+
s3_target {
34+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_searchDocumentReference/"
35+
}
36+
s3_target {
37+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_searchPostDocumentReference/"
38+
}
39+
s3_target {
40+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_updateDocumentReference/"
41+
}
42+
s3_target {
43+
path = "${aws_s3_bucket.target-data-bucket.id}/producer_upsertDocumentReference//"
1444
}
1545
schema_change_policy {
1646
delete_behavior = "LOG"
@@ -49,8 +79,8 @@ resource "aws_glue_job" "glue_job" {
4979
"--enable-auto-scaling" = "true"
5080
"--enable-continous-cloudwatch-log" = "true"
5181
"--datalake-formats" = "delta"
52-
"--source_path" = "s3://${aws_s3_bucket.source-data-bucket.id}/" # Specify the source S3 path
53-
"--target_path" = "s3://${aws_s3_bucket.target-data-bucket.id}/logs" # Specify the destination S3 path
82+
"--source_path" = "s3://${aws_s3_bucket.source-data-bucket.id}/" # Specify the source S3 path
83+
"--target_path" = "s3://${aws_s3_bucket.target-data-bucket.id}/" # Specify the destination S3 path
5484
"--job_name" = "${var.name_prefix}-glue-job"
5585
"--partition_cols" = "date"
5686
"--enable-continuous-log-filter" = "true"

0 commit comments

Comments
 (0)