Skip to content

Commit 40bdb87

Browse files
committed
Merge branch 'main' into feature/CCM-11580-oas-spec-v1
# Conflicts: # infrastructure/terraform/components/api/README.md # infrastructure/terraform/components/api/locals.tf # infrastructure/terraform/components/api/module_lambda_hello_world.tf
2 parents d0a2f66 + 831aaa6 commit 40bdb87

17 files changed

+50
-50
lines changed

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4747
echo "version=$(echo $version)" >> $GITHUB_OUTPUT
4848
echo "is_version_prerelease=$(if [[ $version == *-* ]]; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT
49-
5049
- name: "Check if pull request exists for this branch"
5150
id: pr_exists
5251
env:

.github/workflows/pr_closed.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ jobs:
5656
run: |
5757
bash .github/scripts/dispatch_internal_repo_workflow.sh \
5858
--releaseVersion "main" \
59-
--targetWorkflow "dispatch-deploy-static-notify-supplier-api-env.yaml " \
59+
--targetWorkflow "dispatch-deploy-static-notify-supplier-api-env.yaml" \
6060
--targetEnvironment "main" \
6161
--targetAccountGroup "nhs-notify-supplier-api-dev" \
6262
--targetComponent "${{ matrix.component }}" \
63-
--terraformAction "apply" \
64-
--overrideProjectName "nhs" \
65-
--overrideRoleName "nhs-main-acct-supplier-api-github-deploy"
63+
--terraformAction "apply"

.github/workflows/release_created.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ jobs:
3636
--targetEnvironment "main" \
3737
--targetAccountGroup "nhs-notify-supplier-api-nonprod" \
3838
--targetComponent "${{ matrix.component }}" \
39-
--terraformAction "apply" \
40-
--overrideProjectName "nhs" \
41-
--overrideRoleName "nhs-main-acct-supplier-api-github-deploy"
39+
--terraformAction "apply"

.github/workflows/stage-4-acceptance.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ on:
3131
description: "Version of the software, set by the CI/CD pipeline workflow"
3232
required: true
3333
type: string
34+
pr_number:
35+
required: true
36+
type: string
3437

3538
jobs:
3639
environment-set-up:

infrastructure/terraform/components/api/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ No requirements.
2929

3030
| Name | Source | Version |
3131
|------|--------|---------|
32-
| <a name="module_authorizer_lambda"></a> [authorizer\_lambda](#module\_authorizer\_lambda) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/lambda | v2.0.4 |
32+
| <a name="module_authorizer_lambda"></a> [authorizer\_lambda](#module\_authorizer\_lambda) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-lambda.zip | n/a |
3333
| <a name="module_domain_truststore"></a> [domain\_truststore](#module\_domain\_truststore) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v2.0.17 |
3434
| <a name="module_get_letters"></a> [get\_letters](#module\_get\_letters) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/lambda | v2.0.10 |
3535
| <a name="module_kms"></a> [kms](#module\_kms) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/kms | v2.0.10 |
36+
| <a name="module_get_letters"></a> [get\_letters](#module\_get\_letters) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-lambda.zip | n/a |
37+
| <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 |
3638
| <a name="module_logging_bucket"></a> [logging\_bucket](#module\_logging\_bucket) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v2.0.17 |
37-
| <a name="module_patch_letters"></a> [patch\_letters](#module\_patch\_letters) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/lambda | v2.0.10 |
39+
| <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 |
3840
| <a name="module_supplier_ssl"></a> [supplier\_ssl](#module\_supplier\_ssl) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/ssl | v2.0.17 |
3941
## Outputs
4042

infrastructure/terraform/components/api/acm_certificate.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ resource "aws_acm_certificate" "main" {
88
}
99

1010
resource "aws_acm_certificate_validation" "main" {
11-
certificate_arn = aws_acm_certificate.main.arn
11+
certificate_arn = aws_acm_certificate.main.arn
1212
validation_record_fqdns = [for record in aws_route53_record.acm_validation : record.fqdn]
1313
}

infrastructure/terraform/components/api/api_gateway_domain.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ resource "aws_api_gateway_domain_name" "main" {
88
}
99

1010
mutual_tls_authentication {
11-
truststore_uri = var.manually_configure_mtls_truststore ? "s3://${local.acct.s3_buckets["truststore"]["id"]}/${var.ca_pem_filename}" : "s3://${local.acct.s3_buckets["truststore"]["id"]}/${aws_s3_object.placeholder_truststore[0].key}"
12-
truststore_version = var.manually_configure_mtls_truststore ? data.aws_s3_object.external_ca_cert[0].version_id : aws_s3_object.placeholder_truststore[0].version_id
11+
truststore_uri = var.manually_configure_mtls_truststore ? "s3://${local.acct.s3_buckets["truststore"]["id"]}/${var.ca_pem_filename}" : "s3://${local.acct.s3_buckets["truststore"]["id"]}/${aws_s3_object.placeholder_truststore[0].key}"
12+
truststore_version = var.manually_configure_mtls_truststore ? data.aws_s3_object.external_ca_cert[0].version_id : aws_s3_object.placeholder_truststore[0].version_id
1313
}
1414
}
1515

1616
data "aws_s3_object" "external_ca_cert" {
1717
count = var.manually_configure_mtls_truststore ? 1 : 0
1818

1919
bucket = local.acct.s3_buckets["truststore"]["id"]
20-
key = "${local.csi}/${var.ca_pem_filename}"
20+
key = "${local.csi}/${var.ca_pem_filename}"
2121
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "aws_api_gateway_rest_api" "main" {
2-
name = local.csi
3-
body = local.openapi_spec
4-
description = "Suppliers API"
2+
name = local.csi
3+
body = local.openapi_spec
4+
description = "Suppliers API"
55
disable_execute_api_endpoint = true
66
}

infrastructure/terraform/components/api/locals.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ locals {
55
root_domain_nameservers = local.acct.route53_zone_nameservers["supplier-api"]
66

77
openapi_spec = templatefile("${path.module}/resources/spec.tmpl.json", {
8-
APIG_EXECUTION_ROLE_ARN = aws_iam_role.api_gateway_execution_role.arn
9-
AWS_REGION = var.region
10-
AUTHORIZER_LAMBDA_ARN = module.authorizer_lambda.function_arn
8+
APIG_EXECUTION_ROLE_ARN = aws_iam_role.api_gateway_execution_role.arn
9+
AWS_REGION = var.region
10+
AUTHORIZER_LAMBDA_ARN = module.authorizer_lambda.function_arn
1111
GET_LETTERS_LAMBDA_ARN = module.get_letters.function_arn
1212
PATCH_LETTERS_LAMBDA_ARN = module.patch_letters.function_arn
1313
})

infrastructure/terraform/components/api/module_authorizer_lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "authorizer_lambda" {
2-
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/lambda?ref=v2.0.4"
2+
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.20/terraform-lambda.zip"
33

44
aws_account_id = var.aws_account_id
55
component = var.component

0 commit comments

Comments
 (0)