-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamo.tf
42 lines (40 loc) · 1.13 KB
/
dynamo.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
resource "aws_dynamodb_table" "table_documentos" {
name = "linpe_documentos-${terraform.workspace}"
billing_mode = "PAY_PER_REQUEST"
hash_key = "documentoID"
range_key = "data_cadastro"
tags = merge(var.tags, { enviroment = terraform.workspace })
dynamic "attribute" {
for_each = var.documentos_fields
content {
name = attribute.value
type = "S"
}
}
}
resource "aws_dynamodb_table" "table_eventos" {
name = "linpe_eventos-${terraform.workspace}"
billing_mode = "PAY_PER_REQUEST"
hash_key = "eventosID"
tags = merge(var.tags, { enviroment = terraform.workspace })
dynamic "attribute" {
for_each = var.eventos_fields
content {
name = attribute.value
type = "S"
}
}
}
resource "aws_dynamodb_table" "table_noticias" {
name = "linpe_noticias-${terraform.workspace}"
billing_mode = "PAY_PER_REQUEST"
hash_key = "noticiaID"
tags = merge(var.tags, { enviroment = terraform.workspace })
dynamic "attribute" {
for_each = var.noticias_fields
content {
name = attribute.value
type = "S"
}
}
}