File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,3 @@ mns_admin_role = "role/nhs-mns-events-lambda-delivery"
99environment = " prod"
1010parent_route53_zone_name = " prod.vds.platform.nhs.uk"
1111child_route53_zone_name = " imms.prod.vds.platform.nhs.uk"
12- mesh_mailbox_id = " X26HC138"
13- mesh_dlq_mailbox_id = null
Original file line number Diff line number Diff line change @@ -59,6 +59,22 @@ resource "aws_iam_role" "auto_ops" {
5959 AWS = " arn:aws:iam::${ var . build_agent_account_id } :role/build-agent"
6060 },
6161 Action = " sts:AssumeRole"
62+ },
63+ {
64+ Sid = " " ,
65+ Effect = " Allow" ,
66+ Principal = {
67+ Federated = " arn:aws:iam::${ var . imms_account_id } :oidc-provider/token.actions.githubusercontent.com"
68+ },
69+ Action = " sts:AssumeRoleWithWebIdentity" ,
70+ Condition = {
71+ StringEquals = {
72+ " token.actions.githubusercontent.com:aud" : " sts.amazonaws.com"
73+ },
74+ StringLike = {
75+ " token.actions.githubusercontent.com:sub" : " repo:NHSDigital/immunisation-fhir-api:*"
76+ }
77+ }
6278 }
6379 ]
6480 })
@@ -78,3 +94,15 @@ resource "aws_iam_role_policy_attachment" "custom_auto_ops" {
7894 role = aws_iam_role. auto_ops . name
7995 policy_arn = aws_iam_policy. auto_ops . arn
8096}
97+
98+ resource "aws_iam_openid_connect_provider" "github" {
99+ url = " https://token.actions.githubusercontent.com"
100+
101+ client_id_list = [
102+ " sts.amazonaws.com"
103+ ]
104+
105+ thumbprint_list = [
106+ " 2b18947a6a9fc7764fd8b5fb18a863b0c6dac24f"
107+ ]
108+ }
You can’t perform that action at this time.
0 commit comments