Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Add record dynamodb table
Browse files Browse the repository at this point in the history
  • Loading branch information
thought-tobi committed Apr 9, 2024
1 parent d8fb59a commit e1be4a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test:
@export PYTHONPATH=./ && poetry run pytest test/ --ignore test/integration/manual/ --disable-warnings -s

fmt:
@bash -c 'pre-commit run black --all-files && pre-commit run autoflake --all-files'
@bash -c 'pre-commit run -av'

run:
@poetry run python src/app.py
Expand Down
11 changes: 7 additions & 4 deletions terraform/dynamodb.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "dynamodb_table" {
source = "terraform-aws-modules/dynamodb-table/aws"
source = "terraform-aws-modules/dynamodb-table/aws"

name = "user"
hash_key = "user_id"
Expand All @@ -10,13 +10,15 @@ module "dynamodb_table" {
type = "N"
}
]

billing_mode = "PAY_PER_REQUEST"
}

module "dynamodb_table" {
source = "terraform-aws-modules/dynamodb-table/aws"
source = "terraform-aws-modules/dynamodb-table/aws"

name = "record"
hash_key = "user_id"
name = "record"
hash_key = "user_id"
range_key = "timestamp"

attributes = [
Expand All @@ -30,4 +32,5 @@ module "dynamodb_table" {
}
]

billing_mode = "PAY_PER_REQUEST"
}
4 changes: 2 additions & 2 deletions terraform/ecr.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
}
}

Expand All @@ -21,7 +21,7 @@ data "aws_caller_identity" "current" {}
module "mood_tracker_repository" {
source = "terraform-aws-modules/ecr/aws"

repository_type = "public"
repository_type = "public"
repository_name = "mood-tracker"
repository_image_tag_mutability = "MUTABLE"

Expand Down

0 comments on commit e1be4a7

Please sign in to comment.