diff --git a/services/terraform/dynamodb-test.tf b/services/terraform/dynamodb-test.tf index a1b82c0a9..d3b26ba3b 100644 --- a/services/terraform/dynamodb-test.tf +++ b/services/terraform/dynamodb-test.tf @@ -1,163 +1,163 @@ resource "aws_dynamodb_table" "backup-service-backup-test" { name = "backup-service-backup-test" hash_key = "userID" range_key = "backupID" write_capacity = 10 read_capacity = 10 attribute { name = "userID" type = "S" } attribute { name = "backupID" type = "S" } attribute { name = "created" type = "S" } global_secondary_index { name = "userID-created-index" hash_key = "userID" range_key = "created" write_capacity = 10 read_capacity = 10 projection_type = "INCLUDE" non_key_attributes = ["recoveryData"] } } resource "aws_dynamodb_table" "backup-service-log-test" { name = "backup-service-log-test" hash_key = "backupID" range_key = "logID" write_capacity = 10 read_capacity = 10 attribute { name = "backupID" type = "S" } attribute { name = "logID" type = "S" } } resource "aws_dynamodb_table" "blob-service-blob-test" { name = "blob-service-blob-test" hash_key = "blobHash" write_capacity = 10 read_capacity = 10 attribute { name = "blobHash" type = "S" } } resource "aws_dynamodb_table" "blob-service-reverse-index-test" { name = "blob-service-reverse-index-test" hash_key = "holder" write_capacity = 10 read_capacity = 10 attribute { name = "holder" type = "S" } attribute { name = "blobHash" type = "S" } global_secondary_index { - name = "blobHash-index" - hash_key = "blobHash" - write_capacity = 10 - read_capacity = 10 - projection_type = "ALL" + name = "blobHash-index" + hash_key = "blobHash" + write_capacity = 10 + read_capacity = 10 + projection_type = "ALL" } } resource "aws_dynamodb_table" "tunnelbroker-device-sessions-test" { name = "tunnelbroker-device-sessions-test" hash_key = "SessionId" write_capacity = 10 read_capacity = 10 attribute { name = "SessionId" type = "S" } ttl { attribute_name = "Expire" enabled = true } } resource "aws_dynamodb_table" "tunnelbroker-verification-messages-test" { name = "tunnelbroker-verification-messages-test" hash_key = "DeviceId" write_capacity = 10 read_capacity = 10 attribute { name = "DeviceId" type = "S" } ttl { attribute_name = "Expire" enabled = true } } resource "aws_dynamodb_table" "tunnelbroker-public-keys-test" { name = "tunnelbroker-public-keys-test" hash_key = "DeviceId" write_capacity = 10 read_capacity = 10 attribute { name = "DeviceId" type = "S" } } resource "aws_dynamodb_table" "tunnelbroker-messages-test" { name = "tunnelbroker-messages-test" hash_key = "MessageID" write_capacity = 10 read_capacity = 10 attribute { name = "MessageID" type = "S" } attribute { name = "ToDeviceID" type = "S" } global_secondary_index { - name = "ToDeviceID-index" - hash_key = "ToDeviceID" - write_capacity = 10 - read_capacity = 10 - projection_type = "ALL" + name = "ToDeviceID-index" + hash_key = "ToDeviceID" + write_capacity = 10 + read_capacity = 10 + projection_type = "ALL" } ttl { attribute_name = "Expire" enabled = true } } diff --git a/services/terraform/dynamodb.tf b/services/terraform/dynamodb.tf index 23ee92535..e1645d0b0 100644 --- a/services/terraform/dynamodb.tf +++ b/services/terraform/dynamodb.tf @@ -1,163 +1,163 @@ resource "aws_dynamodb_table" "backup-service-backup" { name = "backup-service-backup" hash_key = "userID" range_key = "backupID" write_capacity = 10 read_capacity = 10 attribute { name = "userID" type = "S" } attribute { name = "backupID" type = "S" } attribute { name = "created" type = "S" } global_secondary_index { name = "userID-created-index" hash_key = "userID" range_key = "created" write_capacity = 10 read_capacity = 10 projection_type = "INCLUDE" non_key_attributes = ["recoveryData"] } } resource "aws_dynamodb_table" "backup-service-log" { name = "backup-service-log" hash_key = "backupID" range_key = "logID" write_capacity = 10 read_capacity = 10 attribute { name = "backupID" type = "S" } attribute { name = "logID" type = "S" } } resource "aws_dynamodb_table" "blob-service-blob" { name = "blob-service-blob" hash_key = "blobHash" write_capacity = 10 read_capacity = 10 attribute { name = "blobHash" type = "S" } } resource "aws_dynamodb_table" "blob-service-reverse-index" { name = "blob-service-reverse-index" hash_key = "holder" write_capacity = 10 read_capacity = 10 attribute { name = "holder" type = "S" } attribute { name = "blobHash" type = "S" } global_secondary_index { - name = "blobHash-index" - hash_key = "blobHash" - write_capacity = 10 - read_capacity = 10 - projection_type = "ALL" + name = "blobHash-index" + hash_key = "blobHash" + write_capacity = 10 + read_capacity = 10 + projection_type = "ALL" } } resource "aws_dynamodb_table" "tunnelbroker-device-sessions" { name = "tunnelbroker-device-sessions" hash_key = "SessionId" write_capacity = 10 read_capacity = 10 attribute { name = "SessionId" type = "S" } ttl { attribute_name = "Expire" enabled = true } } resource "aws_dynamodb_table" "tunnelbroker-verification-messages" { name = "tunnelbroker-verification-messages" hash_key = "DeviceId" write_capacity = 10 read_capacity = 10 attribute { name = "DeviceId" type = "S" } ttl { attribute_name = "Expire" enabled = true } } resource "aws_dynamodb_table" "tunnelbroker-public-keys" { name = "tunnelbroker-public-keys" hash_key = "DeviceId" write_capacity = 10 read_capacity = 10 attribute { name = "DeviceId" type = "S" } } resource "aws_dynamodb_table" "tunnelbroker-messages" { name = "tunnelbroker-messages" hash_key = "MessageID" write_capacity = 10 read_capacity = 10 attribute { name = "MessageID" type = "S" } attribute { name = "ToDeviceID" type = "S" } global_secondary_index { - name = "ToDeviceID-index" - hash_key = "ToDeviceID" - write_capacity = 10 - read_capacity = 10 - projection_type = "ALL" + name = "ToDeviceID-index" + hash_key = "ToDeviceID" + write_capacity = 10 + read_capacity = 10 + projection_type = "ALL" } ttl { attribute_name = "Expire" enabled = true } } diff --git a/services/terraform/localstack.tf b/services/terraform/localstack.tf index 3bbc18944..59a164d64 100644 --- a/services/terraform/localstack.tf +++ b/services/terraform/localstack.tf @@ -1,20 +1,20 @@ variable "HOST" { - type = string + type = string default = "http://localhost:4566" } // https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/custom-service-endpoints#localstack provider "aws" { region = "us-east-2" access_key = "fake" secret_key = "fake" skip_credentials_validation = true skip_metadata_api_check = true skip_requesting_account_id = true s3_use_path_style = true endpoints { dynamodb = var.HOST - s3 = var.HOST + s3 = var.HOST } } diff --git a/services/terraform/s3.tf b/services/terraform/s3.tf index 73d5b7354..6cd8a092a 100644 --- a/services/terraform/s3.tf +++ b/services/terraform/s3.tf @@ -1,11 +1,11 @@ variable "s3_bucket_names" { - type = list + type = list(any) default = [ "commapp-blob", ] } resource "aws_s3_bucket" "comm_buckets" { - count = length(var.s3_bucket_names) + count = length(var.s3_bucket_names) bucket = var.s3_bucket_names[count.index] }