Page MenuHomePhabricator

D13203.id43772.diff
No OneTemporary

D13203.id43772.diff

diff --git a/services/terraform/modules/shared/dynamodb.tf b/services/terraform/modules/shared/dynamodb.tf
--- a/services/terraform/modules/shared/dynamodb.tf
+++ b/services/terraform/modules/shared/dynamodb.tf
@@ -1,3 +1,7 @@
+locals {
+ pitr_enabled = terraform.workspace == "production" ? true : false
+}
+
resource "aws_dynamodb_table" "backup-service-backup" {
name = "backup-service-backup"
hash_key = "userID"
@@ -26,6 +30,10 @@
projection_type = "INCLUDE"
non_key_attributes = ["userKeys", "siweBackupMsg"]
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "backup-service-log" {
@@ -43,6 +51,10 @@
name = "logID"
type = "N"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "blob-service-blobs" {
@@ -77,6 +89,10 @@
range_key = "last_modified"
projection_type = "KEYS_ONLY"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "tunnelbroker-undelivered-messages" {
@@ -94,6 +110,10 @@
name = "messageID"
type = "S"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "tunnelbroker-device-tokens" {
@@ -116,6 +136,10 @@
hash_key = "deviceToken"
projection_type = "KEYS_ONLY"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "identity-users" {
@@ -174,6 +198,10 @@
hash_key = "usernameLower"
projection_type = "KEYS_ONLY"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "identity-devices" {
@@ -219,6 +247,10 @@
range_key = "loginTime"
projection_type = "KEYS_ONLY"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "identity-tokens" {
@@ -236,6 +268,10 @@
name = "signingPublicKey"
type = "S"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "identity-nonces" {
@@ -304,6 +340,10 @@
hash_key = "userID"
projection_type = "KEYS_ONLY"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "identity-one-time-keys" {
@@ -321,6 +361,10 @@
name = "timestamp#keyNumber"
type = "S"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "feature-flags" {
@@ -338,6 +382,10 @@
name = "feature"
type = "S"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}
resource "aws_dynamodb_table" "reports-service-reports" {
@@ -349,4 +397,8 @@
name = "reportID"
type = "S"
}
+
+ point_in_time_recovery {
+ enabled = local.pitr_enabled
+ }
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 7:35 PM (19 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585920
Default Alt Text
D13203.id43772.diff (2 KB)

Event Timeline