Skip to content

Commit

Permalink
[terraform] update nonces table configuration
Browse files Browse the repository at this point in the history
Summary: add nonces table to prod, enable TTL

Test Plan: need to test this on staging. `terraform plan` gave me some issues.

Reviewers: bartek, jon

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8832
  • Loading branch information
vdhanan committed Aug 16, 2023
1 parent f45d933 commit 73e1491
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions services/terraform/modules/shared/dynamodb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ resource "aws_dynamodb_table" "identity-tokens" {
}

resource "aws_dynamodb_table" "identity-nonces" {
# This table doesnt exist in prod
count = var.is_dev ? 1 : 0

name = "identity-nonces"
hash_key = "nonce"
billing_mode = "PAY_PER_REQUEST"
Expand All @@ -241,6 +238,11 @@ resource "aws_dynamodb_table" "identity-nonces" {
name = "nonce"
type = "S"
}

ttl {
attribute_name = "expirationTimeUnix"
enabled = true
}
}

resource "aws_dynamodb_table" "identity-reserved-usernames" {
Expand Down

0 comments on commit 73e1491

Please sign in to comment.