Skip to content

Commit 2d3d128

Browse files
francisco-videira-nhssimonlabareremasl2
authored
Feature/ccm 11192 test data fv (#163)
* CCM-11192: Create test bucket * CCM-10152: SMS Nudge vars * CCM-11192: Test data script * CCM-11192: Fix unit test * CCM-11192: Fix unit test * CCM-11192: Fix unit test * CCM-11192: Add bulk write and test data push * CCM-11192: Batch put supplierStatusSK * CCM-11192: unused import * CCM-11192: fix for main merge * Change shared s3bucket version * CCM-11192: shared modules refs * CCM-11192: should install from root, single lockfile * CCM-11192: correct s3->ssl module * CCM-11192: use workspace for docs build * CCM-11192: use workspace for docs build * CCM-11192: docs should have no unit tests * CCM-11192: test helper was renamed * CCM-11192: usability additions --------- Co-authored-by: simonlabarere <[email protected]> Co-authored-by: Mark Slowey <[email protected]> Co-authored-by: Mark Slowey <[email protected]>
1 parent 2b862fd commit 2d3d128

File tree

27 files changed

+7019
-21254
lines changed

27 files changed

+7019
-21254
lines changed

.github/actions/build-docs/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ runs:
1313
with:
1414
node-version: 18
1515
- name: Npm cli install
16-
working-directory: ./docs
17-
run: npm ci
16+
working-directory: .
17+
run: npm ci -w docs
1818
shell: bash
1919
- name: Setup Ruby
2020
uses: ruby/[email protected]

docs/package-lock.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"engines": {},
99
"keywords": [],
1010
"license": "ISC",
11-
"name": "nhs-notify",
11+
"name": "nhs-notify-docs",
1212
"private": true,
1313
"scripts": {
1414
"build": "JEKYLL_ENV=production bundle exec jekyll build --trace --config _config.yml,_config.version.yml",
15-
"debug": "JEKYLL_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec jekyll serve --config _config.yml,_config.dev.yml,_config.version.yml --limit_posts 100 --trace"
15+
"debug": "JEKYLL_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec jekyll serve --config _config.yml,_config.dev.yml,_config.version.yml --limit_posts 100 --trace",
16+
"test:unit": "echo \"Documentation module has no unit tests\""
1617
},
1718
"version": "1.0.0"
1819
}

infrastructure/terraform/components/api/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ No requirements.
1515
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
1616
| <a name="input_enable_backups"></a> [enable\_backups](#input\_enable\_backups) | Enable backups | `bool` | `false` | no |
1717
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
18+
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | Flag to force deletion of S3 buckets | `bool` | `false` | no |
1819
| <a name="input_force_lambda_code_deploy"></a> [force\_lambda\_code\_deploy](#input\_force\_lambda\_code\_deploy) | If the lambda package in s3 has the same commit id tag as the terraform build branch, the lambda will not update automatically. Set to True if making changes to Lambda code from on the same commit for example during development | `bool` | `false` | no |
1920
| <a name="input_group"></a> [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes |
2021
| <a name="input_kms_deletion_window"></a> [kms\_deletion\_window](#input\_kms\_deletion\_window) | When a kms key is deleted, how long should it wait in the pending deletion state? | `string` | `"30"` | no |
@@ -37,6 +38,7 @@ No requirements.
3738
| <a name="module_kms"></a> [kms](#module\_kms) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-kms.zip | n/a |
3839
| <a name="module_logging_bucket"></a> [logging\_bucket](#module\_logging\_bucket) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip | n/a |
3940
| <a name="module_patch_letters"></a> [patch\_letters](#module\_patch\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-lambda.zip | n/a |
41+
| <a name="module_s3bucket_test_letters"></a> [s3bucket\_test\_letters](#module\_s3bucket\_test\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip | n/a |
4042
| <a name="module_supplier_ssl"></a> [supplier\_ssl](#module\_supplier\_ssl) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-ssl.zip | n/a |
4143
## Outputs
4244

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module "s3bucket_test_letters" {
2+
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-s3bucket.zip"
3+
4+
name = "test-letters"
5+
6+
aws_account_id = var.aws_account_id
7+
region = "eu-west-2"
8+
project = var.project
9+
environment = var.environment
10+
component = var.component
11+
12+
acl = "private"
13+
force_destroy = var.force_destroy
14+
versioning = false
15+
16+
bucket_logging_target = {
17+
bucket = local.acct.s3_buckets["access_logs"]["id"]
18+
}
19+
20+
public_access = {
21+
block_public_acls = true
22+
block_public_policy = true
23+
ignore_public_acls = true
24+
restrict_public_buckets = true
25+
}
26+
27+
default_tags = {
28+
Name = "Supplier API Test Letters"
29+
}
30+
}

infrastructure/terraform/components/api/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ variable "ca_pem_filename" {
105105
default = null
106106
}
107107

108+
variable "force_destroy" {
109+
type = bool
110+
description = "Flag to force deletion of S3 buckets"
111+
default = false
112+
}
113+
108114
variable "letter_table_ttl_hours" {
109115
type = number
110116
description = "Number of hours to set as TTL on letters table"

0 commit comments

Comments
 (0)