Skip to content

Commit d847546

Browse files
CCM-8418: Changes in response to review comments
1 parent b6e93cd commit d847546

24 files changed

+45
-41
lines changed

infrastructure/terraform/components/acct/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
| <a name="module_kms_sandbox"></a> [kms\_sandbox](#module\_kms\_sandbox) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/kms | v1.0.8 |
3737
| <a name="module_obs_datasource"></a> [obs\_datasource](#module\_obs\_datasource) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/obs-datasource | v2.0.3 |
3838
| <a name="module_s3bucket_access_logs"></a> [s3bucket\_access\_logs](#module\_s3bucket\_access\_logs) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v1.0.9 |
39-
| <a name="module_s3bucket_artefacts"></a> [s3bucket\_artefacts](#module\_s3bucket\_artefacts) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v1.0.8 |
39+
| <a name="module_s3bucket_artefacts"></a> [s3bucket\_artefacts](#module\_s3bucket\_artefacts) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v2.0.2 |
4040
| <a name="module_s3bucket_backup_reports"></a> [s3bucket\_backup\_reports](#module\_s3bucket\_backup\_reports) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v1.0.8 |
4141
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | 5.19.0 |
4242
## Outputs

infrastructure/terraform/components/acct/module_s3bucket_artefacts.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "s3bucket_artefacts" {
2-
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v1.0.8"
2+
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v2.0.2"
33

44
name = "artefacts"
55

infrastructure/terraform/components/sandbox/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ No requirements.
1717
| <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 |
1818
| <a name="input_letter_suppliers"></a> [letter\_suppliers](#input\_letter\_suppliers) | Letter suppliers enabled in the environment | <pre>map(object({<br/> enable_polling = bool<br/> default_supplier = optional(bool)<br/> }))</pre> | <pre>{<br/> "WTMMOCK": {<br/> "default_supplier": true,<br/> "enable_polling": true<br/> }<br/>}</pre> | no |
1919
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events to be retained, default of 0 is indefinite | `number` | `0` | no |
20+
| <a name="input_parent_acct_environment"></a> [parent\_acct\_environment](#input\_parent\_acct\_environment) | Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments | `string` | `"main"` | no |
2021
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
2122
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
2223
## Modules

infrastructure/terraform/components/sandbox/locals.tf

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

infrastructure/terraform/components/sandbox/locals_remote_state.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data "terraform_remote_state" "acct" {
1313
var.project,
1414
var.aws_account_id,
1515
"eu-west-2",
16-
local.parent_acct_environment
16+
var.parent_acct_environment
1717
)
1818

1919
region = "eu-west-2"

infrastructure/terraform/components/sandbox/module_backend_api.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module "backend_api" {
99
group = var.group
1010
csi = local.csi
1111
log_retention_in_days = var.log_retention_in_days
12-
parent_acct_environment = local.parent_acct_environment
12+
parent_acct_environment = var.parent_acct_environment
1313
function_s3_bucket = local.acct.s3_buckets["artefacts"]["id"]
1414

1515

infrastructure/terraform/components/sandbox/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,8 @@ variable "letter_suppliers" {
8787
description = "Letter suppliers enabled in the environment"
8888
}
8989

90+
variable "parent_acct_environment" {
91+
type = string
92+
description = "Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments"
93+
default = "main"
94+
}

infrastructure/terraform/modules/backend-api/locals.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
locals {
22
csi = "${var.csi}-${var.module}"
33

4-
repo_root = abspath("${path.module}/../../../..")
5-
lambdas_source_code_dir = abspath("${local.repo_root}/lambdas")
4+
lambdas_dir = "../../../../lambdas"
5+
6+
lambdas_source_code_dir = abspath("${path.module}/${local.lambdas_dir}")
67
pdfjs_layer_zip = abspath("${local.lambdas_source_code_dir}/layers/pdfjs/dist/layer/pdfjs-layer.zip")
78
pdfjs_layer_lockfile = abspath("${local.lambdas_source_code_dir}/layers/pdfjs/package-lock.json")
89

infrastructure/terraform/modules/backend-api/module_authorizer_lambda.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ module "authorizer_lambda" {
2727
USER_POOL_CLIENT_ID = var.cognito_config["USER_POOL_CLIENT_ID"],
2828
}
2929
function_s3_bucket = var.function_s3_bucket
30-
function_code_base_path = ""
31-
function_code_dir = "../../../../lambdas/authorizer/dist"
30+
function_code_base_path = local.lambdas_dir
31+
function_code_dir = "authorizer/dist"
3232
}

infrastructure/terraform/modules/backend-api/module_create_letter_template_lambda.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ module "create_letter_template_lambda" {
2626

2727
lambda_env_vars = local.backend_lambda_environment_variables
2828
function_s3_bucket = var.function_s3_bucket
29-
function_code_base_path = ""
30-
function_code_dir = "../../../../lambdas/backend-api/dist"
29+
function_code_base_path = local.lambdas_dir
30+
function_code_dir = "backend-api/dist"
3131
}
3232

3333
data "aws_iam_policy_document" "create_letter_template_lambda_policy" {

0 commit comments

Comments
 (0)