Skip to content

Commit 9f283e7

Browse files
committed
adds dynamodb_table sub module
1 parent dfe23f5 commit 9f283e7

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

modules/dynamodb_table/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
resource "aws_dynamodb_table" "this" {
3+
name = var.name
4+
hash_key = "LockID"
5+
read_capacity = var.read_capacity
6+
write_capacity = var.write_capacity
7+
8+
attribute {
9+
name = "LockID"
10+
type = "S"
11+
}
12+
13+
tags = var.tags
14+
}

modules/dynamodb_table/outputs.tf

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
variable "name" {
3+
description = "(Required) Unique Table name within a region name of the table"
4+
type = string
5+
}
6+
7+
variable "read_capacity" {
8+
description = "(Optional) Number of read units for this table."
9+
type = number
10+
default = 20
11+
}
12+
13+
variable "write_capacity" {
14+
description = "(Optional) Number of write units for this table."
15+
type = number
16+
default = 20
17+
}
18+
19+
variable "tags" {
20+
description = "(Optional) A map of tags to populate on the created table."
21+
type = map(string)
22+
default = {}
23+
}
24+

modules/dynamodb_table/versions.tf

Whitespace-only changes.

0 commit comments

Comments
 (0)