File tree Expand file tree Collapse file tree 21 files changed +53
-43
lines changed
grafana/non-prod/terraform
lambdas/mns_subscription/src Expand file tree Collapse file tree 21 files changed +53
-43
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11imms_account_id = " 345594581768"
22dspp_account_id = " 603871901111"
33mns_account_id = " 631615744739"
4- csoc_account_id = " 693466633220"
54admin_role = " root" # We shouldn't be using the root account. There should be an Admin role
65dev_ops_role = " role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_DEV-IMMS-Devops_745af4f208886ecc"
76dspp_admin_role = " root"
8- mns_admin_role = " role/nhs-mns-events-lambda-delivery"
97environment = " dev"
108blue_green_split = false
Original file line number Diff line number Diff line change 11imms_account_id = " 084828561157"
22dspp_account_id = " 603871901111"
33mns_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"
65admin_role = " root"
76dev_ops_role = " role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Devops_1d28e4f37b940bcd"
87dspp_admin_role = " root"
9- mns_admin_role = " role/nhs-mns-events-lambda-delivery"
108environment = " preprod"
119blue_green_split = true
Original file line number Diff line number Diff line change 11imms_account_id = " 664418956997"
22dspp_account_id = " 232116723729"
33mns_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"
65admin_role = " root"
76dev_ops_role = " role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PROD-IMMS-Devops_8f32c62195d56b76"
87dspp_admin_role = " root"
9- mns_admin_role = " role/nhs-mns-events-lambda-delivery"
108environment = " prod"
119blue_green_split = true
Original file line number Diff line number Diff 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 = " *"
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change @@ -11,9 +11,13 @@ variable "dspp_account_id" {
1111 type = string
1212}
1313variable "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
1923variable "auto_ops_role" {
@@ -30,6 +34,11 @@ variable "dev_ops_role" {
3034variable "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+
3342variable "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" {}
Original file line number Diff line number Diff line change 1- # main.tf
1+ # main.tf
22terraform {
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+ # }
Original file line number Diff line number Diff line change 11environment = " dev"
22immunisation_account_id = " 345594581768"
33dspp_core_account_id = " 603871901111"
4- csoc_account_id = " 693466633220"
54pds_environment = " int"
65batch_error_notifications_enabled = true
76pds_check_enabled = false
Original file line number Diff line number Diff line change 11environment = " dev"
22immunisation_account_id = " 345594581768"
33dspp_core_account_id = " 603871901111"
4- csoc_account_id = " 693466633220"
54pds_environment = " int"
65batch_error_notifications_enabled = true
76pds_check_enabled = true
You can’t perform that action at this time.
0 commit comments