-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamodb.tf
37 lines (30 loc) · 861 Bytes
/
dynamodb.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
resource "aws_dynamodb_table" "vault" {
name = "${local.name_prefix}-data"
billing_mode = "PAY_PER_REQUEST"
hash_key = "Path"
range_key = "Key"
attribute {
name = "Path"
type = "S"
}
attribute {
name = "Key"
type = "S"
}
point_in_time_recovery {
enabled = true
}
tags = local.tags
}
resource "aws_ssm_parameter" "vault_dynamo_region" {
name = "/vault_dynamo_region"
value = data.aws_region.current.name
type = "String"
overwrite = true
}
resource "aws_ssm_parameter" "vault_dynamo_table" {
name = "/vault_dynamo_table"
value = aws_dynamodb_table.vault.name
type = "String"
overwrite = true
}