-
Notifications
You must be signed in to change notification settings - Fork 5
/
dynamodb.tf
43 lines (42 loc) · 863 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
38
39
40
41
42
43
resource "aws_dynamodb_table" "dynamo_osuser" {
name = "${var.role}-stns-osuser"
read_capacity = 1
write_capacity = 1
hash_key = "name"
attribute {
name = "name"
type = "S"
}
attribute {
name = "id"
type = "S"
}
global_secondary_index {
name = "id-Index"
hash_key = "id"
write_capacity = 1
read_capacity = 1
projection_type = "ALL"
}
}
resource "aws_dynamodb_table" "dynamo_osgroup" {
name = "${var.role}-stns-osgroup"
read_capacity = 1
write_capacity = 1
hash_key = "name"
attribute {
name = "name"
type = "S"
}
attribute {
name = "id"
type = "S"
}
global_secondary_index {
name = "id-Index"
hash_key = "id"
write_capacity = 1
read_capacity = 1
projection_type = "ALL"
}
}