Skip to content

Commit eef7e09

Browse files
committed
VED-711: Disable deletion protection on PR branch deploys. (#765)
1 parent 20f510e commit eef7e09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

terraform/dynamodb.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ resource "aws_dynamodb_table" "audit-table" {
22
name = "immunisation-batch-${local.resource_scope}-audit-table"
33
billing_mode = "PAY_PER_REQUEST"
44
hash_key = "message_id"
5-
deletion_protection_enabled = true
5+
deletion_protection_enabled = !local.is_temp
66

77
attribute {
88
name = "message_id"
@@ -51,7 +51,7 @@ resource "aws_dynamodb_table" "delta-dynamodb-table" {
5151
name = "imms-${local.resource_scope}-delta"
5252
billing_mode = "PAY_PER_REQUEST"
5353
hash_key = "PK"
54-
deletion_protection_enabled = true
54+
deletion_protection_enabled = !local.is_temp
5555

5656
attribute {
5757
name = "PK"
@@ -113,7 +113,7 @@ resource "aws_dynamodb_table" "events-dynamodb-table" {
113113
hash_key = "PK"
114114
stream_enabled = true
115115
stream_view_type = "NEW_IMAGE"
116-
deletion_protection_enabled = true
116+
deletion_protection_enabled = !local.is_temp
117117

118118
attribute {
119119
name = "PK"

0 commit comments

Comments
 (0)