Skip to content

Commit

Permalink
[DEV-1425] Refactor storage.tf file (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
datalek authored Feb 23, 2024
1 parent 41cbc28 commit 1323f1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
24 changes: 24 additions & 0 deletions .infrastructure/dynamodb.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Webinar questions database

module "dynamodb_webinar_questions" {
source = "git::github.com/terraform-aws-modules/terraform-aws-dynamodb-table.git?ref=715399dbe24f6443820bf5de80f6100b35d56355" # v4.0.0

billing_mode = "PAY_PER_REQUEST"
deletion_protection_enabled = true

name = "WebinarQuestions"
hash_key = "webinarId"
range_key = "createdAt"
server_side_encryption_enabled = true

attributes = [
{
name = "webinarId"
type = "S"
},
{
name = "createdAt"
type = "S"
},
]
}
25 changes: 0 additions & 25 deletions .infrastructure/storage.tf → .infrastructure/s3_bucket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,31 +63,6 @@ resource "aws_s3_bucket_policy" "cloudfront" {
policy = data.aws_iam_policy_document.website_iam_policy.json
}

# Webinar questions database

module "dynamodb_webinar_questions" {
source = "git::github.com/terraform-aws-modules/terraform-aws-dynamodb-table.git?ref=715399dbe24f6443820bf5de80f6100b35d56355" # v4.0.0

billing_mode = "PAY_PER_REQUEST"
deletion_protection_enabled = true

name = "WebinarQuestions"
hash_key = "webinarId"
range_key = "createdAt"
server_side_encryption_enabled = true

attributes = [
{
name = "webinarId"
type = "S"
},
{
name = "createdAt"
type = "S"
},
]
}

## Bucket S3 for CMS Strapi Medialibrary
resource "random_integer" "bucket_random_integer" {
min = 1
Expand Down

0 comments on commit 1323f1e

Please sign in to comment.