Skip to content

Commit 9cf8f54

Browse files
committed
NRL-1479 Add athena views to deployment
1 parent 7a34959 commit 9cf8f54

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

terraform/account-wide-infrastructure/dev/athena.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module "dev-athena" {
22
source = "../modules/athena"
33
name_prefix = "nhsd-nrlf--dev"
44
target_bucket_name = module.dev-glue.target_bucket_name
5+
glue_database = module.dev-glue.glue_database
56
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ resource "aws_athena_workgroup" "athena" {
2020
resource "aws_athena_named_query" "rep_consumer" {
2121
name = "rep_consumer"
2222
workgroup = aws_athena_workgroup.athena.id
23-
database = module.dev-glue.glue_database
23+
database = var.glue_database
2424
query = file("${path.module}/sql/rep_consumer.sql")
2525
}
2626

2727
resource "aws_athena_named_query" "rep_producer" {
2828
name = "rep_producer"
2929
workgroup = aws_athena_workgroup.athena.id
30-
database = module.dev-glue.glue_database
30+
database = var.glue_database
3131
query = file("${path.module}/sql/rep_producer.sql")
3232
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
variable "database" {
2-
description = "What the db will be called"
3-
default = "nrl_reporting"
4-
}
5-
61
variable "name_prefix" {
72
type = string
83
description = "The prefix to apply to all resources in the module."
@@ -11,3 +6,8 @@ variable "name_prefix" {
116
variable "target_bucket_name" {
127
type = string
138
}
9+
10+
variable "glue_database" {
11+
type = string
12+
description = "The Glue database in use"
13+
}

0 commit comments

Comments
 (0)