Skip to content

Commit

Permalink
feat: denormalized
Browse files Browse the repository at this point in the history
  • Loading branch information
dadiorchen committed Nov 25, 2023
1 parent c1052c4 commit 8bc3476
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
14 changes: 7 additions & 7 deletions database-grants/terraform/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ module "field_data_schema" {
}
}

module "query_schema" {
source = "./schemas/query"
providers = {
postgresql = postgresql.treetracker
}
}

module "reporting_schema" {
source = "./schemas/reporting"
providers = {
Expand Down Expand Up @@ -89,3 +82,10 @@ module "wallet_schema" {
postgresql = postgresql.treetracker
}
}

module "denormalized_schema" {
source = "./schemas/denormalized"
providers = {
postgresql = postgresql.treetracker
}
}
1 change: 0 additions & 1 deletion database-grants/terraform/dev/other

This file was deleted.

1 change: 1 addition & 0 deletions database-grants/terraform/dev/schemas/denormalized
1 change: 0 additions & 1 deletion database-grants/terraform/dev/schemas/query

This file was deleted.

7 changes: 7 additions & 0 deletions database-grants/terraform/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ module "extra" {
module.wallet_schema
]
}

module "denormalized_schema" {
source = "./schemas/denormalized"
providers = {
postgresql = postgresql.treetracker
}
}
8 changes: 8 additions & 0 deletions database-grants/terraform/prod/schemas/denormalized/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

module "microservice_schema" {
source = "./../../modules/microservice_schema"
schema = "denormalized"
service_user_table_grants = ["SELECT", "INSERT", "UPDATE", "DELETE"] # allow delete from this schema
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
postgresql = {
source = "cyrilgdn/postgresql"
version = "1.11.0"
}
}
}

0 comments on commit 8bc3476

Please sign in to comment.