-
Notifications
You must be signed in to change notification settings - Fork 0
[PRMP-1444] Create UserRestriction DynamoDB Table with GSIs and Model #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
62a9015
0ea6364
7f99fe6
380a9a9
70744db
8e67a9a
c5d6666
ca966a6
c8f4d86
3778a57
5f34934
ce644ce
95e4c98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -590,6 +590,77 @@ module "bulk_upload_contact_lookup_table" { | |
| }, | ||
| ] | ||
|
|
||
| environment = var.environment | ||
| owner = var.owner | ||
| } | ||
|
|
||
| module "user_restriction_table" { | ||
| source = "./modules/dynamo_db" | ||
| table_name = var.user_restrictions_table_name | ||
| hash_key = "ID" | ||
| deletion_protection_enabled = var.deletion_protection_enabled | ||
| point_in_time_recovery_enabled = !local.is_sandbox | ||
|
|
||
| attributes = [ | ||
| { | ||
| name = "ID" | ||
| type = "S" | ||
| }, | ||
| { | ||
| name = "RestrictedSmartCardId" | ||
| type = "S" | ||
| }, | ||
| { | ||
| name = "NhsNumber" | ||
| type = "S" | ||
| }, | ||
| { | ||
| name = "OdsCode" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be Custodian
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| type = "S" | ||
| }, | ||
| { | ||
| name = "Created" | ||
| type = "N" | ||
| }, | ||
| { | ||
| name = "CreatorSmartCardId" | ||
| type = "S" | ||
| } | ||
| ] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We will also need a RemoverSmartcardId
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as index? |
||
|
|
||
| global_secondary_indexes = [ | ||
| { | ||
| name = "RestrictedSmartCardIdIndex" | ||
| hash_key = "RestrictedSmartCardId" | ||
| range_key = "Created" | ||
| projection_type = "ALL" | ||
| }, | ||
| { | ||
| name = "NhsNumberIndex" | ||
| hash_key = "NhsNumber" | ||
| range_key = "Created" | ||
| projection_type = "ALL" | ||
| }, | ||
| { | ||
| name = "OdsCodeNhsNumberIndex" | ||
| hash_key = "OdsCode" | ||
| range_key = "NhsNumber" | ||
| projection_type = "ALL" | ||
| }, | ||
| { | ||
| name = "OdsCodeSmartCardIdIndex" | ||
| hash_key = "OdsCode" | ||
| range_key = "RestrictedSmartCardId" | ||
| projection_type = "ALL" | ||
| }, | ||
| { | ||
| name = "CreatorIndex" | ||
| hash_key = "CreatorSmartCardId" | ||
| range_key = "Created" | ||
| projection_type = "ALL" | ||
| } | ||
| ] | ||
|
|
||
| environment = var.environment | ||
| owner = var.owner | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smartcard