Skip to content

Commit

Permalink
Merge pull request #13 from CloudProjectD/feat/module-dynamodb
Browse files Browse the repository at this point in the history
[Feat] dynamodb module
  • Loading branch information
dusdjhyeon authored Dec 6, 2023
2 parents 839a6c2 + 697e4ef commit 3c11f1d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
25 changes: 25 additions & 0 deletions module-dynamodb/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
provider "aws" {
region = var.aws_region
}

resource "aws_dynamodb_table" "khu-dynamo-table" {
name = var.dynamodb_table_name
read_capacity = 20
write_capacity = 20
hash_key = "id"
range_key = "created_at"

attribute {
name = "id"
type = "S"
}

attribute {
name = "created_at"
type = "S"
}

tags = {
Name = "${var.dynamodb_table_name}"
}
}
3 changes: 3 additions & 0 deletions module-dynamodb/outuputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "dynamodb_table_arn" {
value = aws_dynamodb_table.khu-dynamo-table.arn
}
7 changes: 7 additions & 0 deletions module-dynamodb/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variable "aws_region" {
type = string
}

variable "dynamodb_table_name" {
type = string
}

0 comments on commit 3c11f1d

Please sign in to comment.