Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit a5c186d

Browse files
authored
Merge pull request #143 from silinternational/develop
Release 3.2.0 - Point-In-Time-Recovery (PITR) and Deletion-protection
2 parents c37551e + f1658db commit a5c186d

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

terraform/main.tf

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,22 @@ module "dns_for_failover" {
9999
* Manage DynamoDB tables used by the functions.
100100
*/
101101
resource "aws_dynamodb_table" "api_keys" {
102-
name = "${var.app_name}_${local.app_env}_api-key_global"
103-
hash_key = "value"
104-
billing_mode = "PAY_PER_REQUEST"
105-
stream_enabled = true
106-
stream_view_type = "NEW_IMAGE"
102+
name = "${var.app_name}_${local.app_env}_api-key_global"
103+
hash_key = "value"
104+
billing_mode = "PAY_PER_REQUEST"
105+
deletion_protection_enabled = true
106+
stream_enabled = true
107+
stream_view_type = "NEW_IMAGE"
107108

108109
attribute {
109110
name = "value"
110111
type = "S"
111112
}
112113

114+
point_in_time_recovery {
115+
enabled = true
116+
}
117+
113118
replica {
114119
region_name = var.aws_region_secondary
115120
}
@@ -119,17 +124,22 @@ resource "aws_dynamodb_table" "api_keys" {
119124
}
120125
}
121126
resource "aws_dynamodb_table" "totp" {
122-
name = "${var.app_name}_${local.app_env}_totp_global"
123-
hash_key = "uuid"
124-
billing_mode = "PAY_PER_REQUEST"
125-
stream_enabled = true
126-
stream_view_type = "NEW_IMAGE"
127+
name = "${var.app_name}_${local.app_env}_totp_global"
128+
hash_key = "uuid"
129+
billing_mode = "PAY_PER_REQUEST"
130+
deletion_protection_enabled = true
131+
stream_enabled = true
132+
stream_view_type = "NEW_IMAGE"
127133

128134
attribute {
129135
name = "uuid"
130136
type = "S"
131137
}
132138

139+
point_in_time_recovery {
140+
enabled = true
141+
}
142+
133143
replica {
134144
region_name = var.aws_region_secondary
135145
}
@@ -139,17 +149,22 @@ resource "aws_dynamodb_table" "totp" {
139149
}
140150
}
141151
resource "aws_dynamodb_table" "u2f" {
142-
name = "${var.app_name}_${local.app_env}_u2f_global"
143-
hash_key = "uuid"
144-
billing_mode = "PAY_PER_REQUEST"
145-
stream_enabled = true
146-
stream_view_type = "NEW_IMAGE"
152+
name = "${var.app_name}_${local.app_env}_u2f_global"
153+
hash_key = "uuid"
154+
billing_mode = "PAY_PER_REQUEST"
155+
deletion_protection_enabled = true
156+
stream_enabled = true
157+
stream_view_type = "NEW_IMAGE"
147158

148159
attribute {
149160
name = "uuid"
150161
type = "S"
151162
}
152163

164+
point_in_time_recovery {
165+
enabled = true
166+
}
167+
153168
replica {
154169
region_name = var.aws_region_secondary
155170
}

0 commit comments

Comments
 (0)