-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating dynamo table for install activity data (#911)
* Adding activity tables * Fixing dynamo source version * Fixing dynamo version supported by terraform version * Updating output module reference * Adding IAM permissions for dynamo to backend lambda
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module dynamodb { | ||
source = "terraform-aws-modules/dynamodb-table/aws" | ||
version = "1.3.0" | ||
|
||
name = var.table_name | ||
|
||
hash_key = var.hash_key | ||
range_key = var.range_key | ||
attributes = var.attributes | ||
|
||
table_class = var.table_class | ||
|
||
point_in_time_recovery_enabled = var.tags.env == "prod" ? true : false | ||
|
||
autoscaling_enabled = var.autoscaling_enabled | ||
create_table = var.create_table | ||
|
||
tags = var.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output table_arn { | ||
description = "ARN of the DynamoDB table" | ||
value = module.dynamodb.dynamodb_table_arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
variable attributes { | ||
type = list(map(string)) | ||
description = "Please provide the attributes list for the keys" | ||
default = [] | ||
} | ||
|
||
variable autoscaling_enabled { | ||
type = bool | ||
description = "Please provide if autoscaling is enabled" | ||
default = false | ||
} | ||
|
||
variable create_table { | ||
type = bool | ||
description = "Please provide if table should be created" | ||
default = false | ||
} | ||
|
||
variable hash_key { | ||
type = string | ||
description = "Please provide the hash key for table" | ||
} | ||
|
||
variable range_key { | ||
type = string | ||
description = "Please provide the range key for table" | ||
default = null | ||
} | ||
|
||
variable table_class { | ||
type = string | ||
description = "Please provide table_class" | ||
default = "STANDARD" | ||
} | ||
|
||
variable table_name { | ||
type = string | ||
description = "Please provide name for dynamo table" | ||
} | ||
|
||
variable tags { | ||
type = map(string) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters