Skip to content

Commit 483a523

Browse files
authored
Merge branch 'master' into feature/VED-804-move-record-processor-to-lambdas
2 parents a1eae10 + be12e80 commit 483a523

File tree

21 files changed

+53
-43
lines changed

21 files changed

+53
-43
lines changed

.github/workflows/deploy-backend.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ jobs:
137137
if: ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
138138
working-directory: "./lambdas/mns_subscription"
139139
env:
140+
APIGEE_ENVIRONMENT: int
140141
SQS_ARN: ${{ env.ID_SYNC_QUEUE_ARN }}
141142
run: |
142143
poetry install --no-root
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
imms_account_id = "345594581768"
22
dspp_account_id = "603871901111"
33
mns_account_id = "631615744739"
4-
csoc_account_id = "693466633220"
54
admin_role = "root" # We shouldn't be using the root account. There should be an Admin role
65
dev_ops_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_DEV-IMMS-Devops_745af4f208886ecc"
76
dspp_admin_role = "root"
8-
mns_admin_role = "role/nhs-mns-events-lambda-delivery"
97
environment = "dev"
108
blue_green_split = false
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
imms_account_id = "084828561157"
22
dspp_account_id = "603871901111"
33
mns_account_id = "631615744739"
4-
csoc_account_id = "693466633220"
54
# admin_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Admin_acce656dcacf6f4c"
65
admin_role = "root"
76
dev_ops_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Devops_1d28e4f37b940bcd"
87
dspp_admin_role = "root"
9-
mns_admin_role = "role/nhs-mns-events-lambda-delivery"
108
environment = "preprod"
119
blue_green_split = true
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
imms_account_id = "664418956997"
22
dspp_account_id = "232116723729"
33
mns_account_id = "758334270304"
4-
csoc_account_id = "693466633220"
54
# admin_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PROD-IMMS-Admin_edd6691e4b74064e"
65
admin_role = "root"
76
dev_ops_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PROD-IMMS-Devops_8f32c62195d56b76"
87
dspp_admin_role = "root"
9-
mns_admin_role = "role/nhs-mns-events-lambda-delivery"
108
environment = "prod"
119
blue_green_split = true

infrastructure/account/kms.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ locals {
7171
Sid = "AllowMNSLambdaDelivery",
7272
Effect = "Allow",
7373
Principal = {
74-
AWS = "arn:aws:iam::${var.mns_account_id}:${var.mns_admin_role}"
74+
AWS = "arn:aws:iam::${var.mns_account_id}:${var.mns_delivery_role}"
7575
},
7676
Action = "kms:GenerateDataKey",
7777
Resource = "*"

infrastructure/account/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ terraform {
66
}
77
}
88
backend "s3" {
9-
region = "eu-west-2"
10-
key = "state"
9+
region = "eu-west-2"
10+
key = "state"
11+
use_lockfile = true
1112
}
1213
required_version = ">= 1.5.0"
1314
}
@@ -31,4 +32,4 @@ provider "aws" {
3132
Environment = var.environment
3233
}
3334
}
34-
}
35+
}

infrastructure/account/variables.tf

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ variable "dspp_account_id" {
1111
type = string
1212
}
1313
variable "csoc_account_id" {
14-
description = "CSOC Core AWS account ID"
14+
description = "CSOC AWS account ID - destination for log forwarding"
1515
type = string
16-
16+
default = "693466633220"
17+
}
18+
variable "mns_account_id" {
19+
type = string
20+
description = "MNS AWS account ID - trusted source for MNS notifications"
1721
}
1822

1923
variable "auto_ops_role" {
@@ -30,6 +34,11 @@ variable "dev_ops_role" {
3034
variable "dspp_admin_role" {
3135
type = string
3236
}
37+
variable "mns_delivery_role" {
38+
type = string
39+
default = "role/nhs-mns-events-lambda-delivery"
40+
}
41+
3342
variable "build_agent_account_id" {
3443
type = string
3544
default = "958002497996"
@@ -44,6 +53,3 @@ variable "blue_green_split" {
4453
description = "Whether this account uses blue / green split deployments"
4554
default = false
4655
}
47-
48-
variable "mns_account_id" {}
49-
variable "mns_admin_role" {}

infrastructure/grafana/non-prod/terraform/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# main.tf
1+
# main.tf
22
terraform {
33
required_providers {
44
aws = {
@@ -15,8 +15,9 @@ terraform {
1515
}
1616
}
1717
backend "s3" {
18-
bucket = "immunisation-grafana-terraform-state"
19-
region = "eu-west-2"
18+
bucket = "immunisation-grafana-terraform-state"
19+
region = "eu-west-2"
20+
use_lockfile = true
2021
}
2122
required_version = ">= 1.5.0"
2223
}
@@ -63,4 +64,4 @@ resource "null_resource" "natgw_message" {
6364
# vpc_id = aws_vpc.grafana_main.id
6465
# ecs_sg_id = aws_security_group.ecs_tasks.id
6566
# route_table_ids = aws_route_table.private[*].id
66-
# }
67+
# }

infrastructure/instance/environments/dev/int/variables.tfvars

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
4-
csoc_account_id = "693466633220"
54
pds_environment = "int"
65
batch_error_notifications_enabled = true
76
pds_check_enabled = false

infrastructure/instance/environments/dev/internal-dev/variables.tfvars

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
environment = "dev"
22
immunisation_account_id = "345594581768"
33
dspp_core_account_id = "603871901111"
4-
csoc_account_id = "693466633220"
54
pds_environment = "int"
65
batch_error_notifications_enabled = true
76
pds_check_enabled = true

0 commit comments

Comments
 (0)