-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamodb.tf
50 lines (42 loc) · 881 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
44
45
46
47
48
49
50
resource "aws_dynamodb_table" "exchange-rate" {
name = "ExchangeRate"
billing_mode = "PAY_PER_REQUEST"
hash_key = "baseCurrency"
attribute {
name = "baseCurrency"
type = "S"
}
}
resource "aws_dynamodb_table" "product" {
name = "Product"
billing_mode = "PAY_PER_REQUEST"
hash_key = "category"
range_key = "id"
attribute {
name = "category"
type = "S"
}
attribute {
name = "id"
type = "S"
}
attribute {
name = "baseCurrency"
type = "S"
}
global_secondary_index {
name = "CategoryBaseCurrencyIndex"
hash_key = "category"
range_key = "baseCurrency"
projection_type = "ALL"
}
}
resource "aws_dynamodb_table" "circuit-breaker" {
name = "CircuitBreaker"
billing_mode = "PAY_PER_REQUEST"
hash_key = "key"
attribute {
name = "key"
type = "S"
}
}