From 3df28e1133bab21c2e3d93b270c132309c0da69d Mon Sep 17 00:00:00 2001 From: Will Freeman Date: Thu, 22 May 2025 23:35:26 -0600 Subject: [PATCH] aws dynamodb operator_info table --- terraform/main.tf | 5 +++++ terraform/modules/operator_info/main.tf | 10 ++++++++++ terraform/modules/operator_info/outputs.tf | 9 +++++++++ terraform/modules/operator_info/variables.tf | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 terraform/modules/operator_info/main.tf create mode 100644 terraform/modules/operator_info/outputs.tf create mode 100644 terraform/modules/operator_info/variables.tf diff --git a/terraform/main.tf b/terraform/main.tf index ae2b657..9285620 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -15,3 +15,8 @@ module "alpr_clusters" { deflock_cdn_bucket = var.deflock_cdn_bucket rate = "rate(1 hour)" } + +module "operator_info" { + module_name = "operator_info" + source = "./modules/operator_info" +} diff --git a/terraform/modules/operator_info/main.tf b/terraform/modules/operator_info/main.tf new file mode 100644 index 0000000..7fac7d5 --- /dev/null +++ b/terraform/modules/operator_info/main.tf @@ -0,0 +1,10 @@ +resource "aws_dynamodb_table" "operator_info" { + name = var.module_name + billing_mode = "PAY_PER_REQUEST" + hash_key = "wikidataId" + + attribute { + name = "wikidataId" + type = "S" + } +} diff --git a/terraform/modules/operator_info/outputs.tf b/terraform/modules/operator_info/outputs.tf new file mode 100644 index 0000000..33fecf8 --- /dev/null +++ b/terraform/modules/operator_info/outputs.tf @@ -0,0 +1,9 @@ +output "dynamodb_table_name" { + description = "The name of the DynamoDB table" + value = aws_dynamodb_table.operator_info.name +} + +output "dynamodb_table_arn" { + description = "The ARN of the DynamoDB table" + value = aws_dynamodb_table.operator_info.arn +} diff --git a/terraform/modules/operator_info/variables.tf b/terraform/modules/operator_info/variables.tf new file mode 100644 index 0000000..6fbb82f --- /dev/null +++ b/terraform/modules/operator_info/variables.tf @@ -0,0 +1,3 @@ +variable "module_name" { + description = "Name of the module" +}