-
Notifications
You must be signed in to change notification settings - Fork 4
NRL-1860 Tweak prep scripts to support NFT runs #1111
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
Merged
anjalitrace2-nhs
merged 8 commits into
develop
from
feature/made14-NRL-1860-nft-run-prep
Dec 18, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7e84873
[NRL-1666] Add infra-as-code for new tables. Make dynamodb param conf…
mattdean3-nhs 6bfc4ac
[NRL-1860] Update perftest env to use baseline table
mattdean3-nhs 4335f9e
[NRL-1860] Switch nft seed script to use poisson distribution for cou…
mattdean3-nhs 2d02b2a
[NRL-1860] Create nft seed data file in dist directory
mattdean3-nhs 72620c0
[NRL-1860] Switch pointer-table-name var to prefix to match module de…
mattdean3-nhs 81b45dc
[NRL-1860] Undo adding perftest tables to TF
mattdean3-nhs ddf949d
[NRL-1860] Add account-wide meta-data bucket module. Add metadata buc…
mattdean3-nhs fc5c8fb
[NRL-1860] Remove commented out seed nft code
mattdean3-nhs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
4 changes: 4 additions & 0 deletions
4
terraform/account-wide-infrastructure/modules/metadata-bucket/output.tf
This file contains hidden or 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 "bucket_name" { | ||
| description = "Name of the metadata S3 bucket" | ||
| value = aws_s3_bucket.metadata_bucket.bucket | ||
| } |
56 changes: 56 additions & 0 deletions
56
terraform/account-wide-infrastructure/modules/metadata-bucket/s3.tf
This file contains hidden or 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,56 @@ | ||
| resource "aws_s3_bucket" "metadata_bucket" { | ||
| bucket = "${var.name_prefix}-metadata" | ||
| force_destroy = false | ||
| } | ||
|
|
||
| resource "aws_s3_bucket_policy" "metadata_bucket_policy" { | ||
| bucket = aws_s3_bucket.metadata_bucket.id | ||
|
|
||
| policy = jsonencode({ | ||
| Version = "2012-10-17" | ||
| Id = "metadata_bucket_policy" | ||
| Statement = [ | ||
| { | ||
| Sid = "HTTPSOnly" | ||
| Effect = "Deny" | ||
| Principal = "*" | ||
| Action = "s3:*" | ||
| Resource = [ | ||
| aws_s3_bucket.metadata_bucket.arn, | ||
| "${aws_s3_bucket.metadata_bucket.arn}/*", | ||
| ] | ||
| Condition = { | ||
| Bool = { | ||
| "aws:SecureTransport" = "false" | ||
| } | ||
| } | ||
| }, | ||
| ] | ||
| }) | ||
| } | ||
|
|
||
| resource "aws_s3_bucket_public_access_block" "metadata_bucket_public_access_block" { | ||
| bucket = aws_s3_bucket.metadata_bucket.id | ||
|
|
||
| block_public_acls = true | ||
| block_public_policy = true | ||
| ignore_public_acls = true | ||
| restrict_public_buckets = true | ||
| } | ||
|
|
||
| resource "aws_s3_bucket_server_side_encryption_configuration" "metadata_bucket" { | ||
| bucket = aws_s3_bucket.metadata_bucket.bucket | ||
|
|
||
| rule { | ||
| apply_server_side_encryption_by_default { | ||
| sse_algorithm = "AES256" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource "aws_s3_bucket_versioning" "metadata_bucket" { | ||
| bucket = aws_s3_bucket.metadata_bucket.id | ||
| versioning_configuration { | ||
| status = "Enabled" | ||
| } | ||
| } |
4 changes: 4 additions & 0 deletions
4
terraform/account-wide-infrastructure/modules/metadata-bucket/vars.tf
This file contains hidden or 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 @@ | ||
| variable "name_prefix" { | ||
| type = string | ||
| description = "The prefix to apply to all resources in the module." | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| account_name = "dev" | ||
| aws_account_name = "dev" | ||
|
|
||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--dev" | ||
| dynamodb_sandbox_pointers_table_prefix = "nhsd-nrlf--dev-sandbox" | ||
|
|
||
| domain = "api.record-locator.dev.national.nhs.uk" | ||
| public_domain = "internal-dev.api.service.nhs.uk" | ||
| public_sandbox_domain = "internal-dev-sandbox.api.service.nhs.uk" | ||
| log_retention_period = 90 | ||
| enable_reporting = false | ||
|
|
||
| log_retention_period = 90 | ||
| enable_reporting = false |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,13 @@ | ||
| account_name = "int" | ||
| aws_account_name = "test" | ||
|
|
||
| domain = "api.record-locator.int.national.nhs.uk" | ||
| deletion_protection = true | ||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--int" | ||
| dynamodb_sandbox_pointers_table_prefix = "nhsd-nrlf--int-sandbox" | ||
| deletion_protection = true | ||
|
|
||
| domain = "api.record-locator.int.national.nhs.uk" | ||
| public_domain = "int.api.service.nhs.uk" | ||
| public_sandbox_domain = "sandbox.api.service.nhs.uk" | ||
| log_retention_period = 90 | ||
| enable_reporting = true | ||
|
|
||
| log_retention_period = 90 | ||
| enable_reporting = true |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| account_name = "perftest" | ||
| aws_account_name = "test" | ||
|
|
||
| domain = "perftest.record-locator.national.nhs.uk" | ||
| public_domain = "perftest.api.service.nhs.uk" | ||
| deletion_protection = true | ||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--perftest" | ||
|
|
||
| domain = "perftest.record-locator.national.nhs.uk" | ||
| public_domain = "perftest.api.service.nhs.uk" | ||
|
|
||
| log_retention_period = 30 | ||
| enable_reporting = false | ||
| disable_firehose_lambda_subscriptions = true |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| account_name = "prod" | ||
| aws_account_name = "prod" | ||
|
|
||
| domain = "api.record-locator.national.nhs.uk" | ||
| public_domain = "api.service.nhs.uk" | ||
| deletion_protection = true | ||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--prod" | ||
| deletion_protection = true | ||
|
|
||
| domain = "api.record-locator.national.nhs.uk" | ||
| public_domain = "api.service.nhs.uk" | ||
|
|
||
| log_retention_period = 2192 | ||
| enable_reporting = true |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| account_name = "qa" | ||
| aws_account_name = "test" | ||
|
|
||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--qa" | ||
| dynamodb_sandbox_pointers_table_prefix = "nhsd-nrlf--qa-sandbox" | ||
|
|
||
| domain = "qa.record-locator.national.nhs.uk" | ||
| public_domain = "internal-qa.api.service.nhs.uk" | ||
| public_sandbox_domain = "internal-qa-sandbox.api.service.nhs.uk" | ||
| log_retention_period = 90 | ||
| enable_reporting = false | ||
|
|
||
| log_retention_period = 90 | ||
| enable_reporting = false |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| account_name = "ref" | ||
| aws_account_name = "test" | ||
|
|
||
| domain = "api.record-locator.ref.national.nhs.uk" | ||
| public_domain = "ref.api.service.nhs.uk" | ||
| dynamodb_pointers_table_prefix = "nhsd-nrlf--ref" | ||
|
|
||
| domain = "api.record-locator.ref.national.nhs.uk" | ||
| public_domain = "ref.api.service.nhs.uk" | ||
|
|
||
| log_retention_period = 30 | ||
| enable_reporting = false |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.