Skip to content

Commit f7f7416

Browse files
committed
Hosted zone import and variables change
1 parent c2d75ab commit f7f7416

File tree

6 files changed

+30
-22
lines changed

6 files changed

+30
-22
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
imms_account_id = "084828561157"
2-
dspp_account_id = "603871901111"
3-
admin_role = "aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Admin_acce656dcacf6f4c"
4-
dev_ops_role = "aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Devops_1d28e4f37b940bcd"
5-
auto_ops_role = "auto-ops"
6-
dspp_admin_role = "root"
7-
environment = "int"
1+
imms_account_id = "084828561157"
2+
dspp_account_id = "603871901111"
3+
admin_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Admin_acce656dcacf6f4c"
4+
dev_ops_role = "role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_PREPROD-IMMS-Devops_1d28e4f37b940bcd"
5+
auto_ops_role = "role/auto-ops"
6+
dspp_admin_role = "root"
7+
environment = "int"
8+
route53_zone_name = "imms.int.vds.platform.nhs.uk"
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
imms_account_id = "345594581768"
2-
dspp_account_id = "603871901111"
3-
admin_role = "root" # We shouldn't be using the root account. There should be an Admin role
4-
dev_ops_role = "DevOps"
5-
auto_ops_role = "auto-ops"
6-
dspp_admin_role = "root"
7-
environment = "non-prod"
1+
imms_account_id = "345594581768"
2+
dspp_account_id = "603871901111"
3+
admin_role = "root" # We shouldn't be using the root account. There should be an Admin role
4+
dev_ops_role = "role/DevOps"
5+
auto_ops_role = "role/auto-ops"
6+
dspp_admin_role = "root"
7+
environment = "non-prod"
8+
route53_zone_name = "imms.dev.vds.platform.nhs.uk"
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
imms_account_id = "664418956997"
22
dspp_account_id = "232116723729"
33
# TODO: Fill in the values below
4-
admin_role = "" # We shouldn't be using the root account. There should be an Admin role
5-
dev_ops_role = ""
6-
auto_ops_role = "auto-ops"
7-
dspp_admin_role = "root"
8-
environment = "prod"
4+
admin_role = "" # We shouldn't be using the root account. There should be an Admin role
5+
dev_ops_role = ""
6+
auto_ops_role = "role/auto-ops"
7+
dspp_admin_role = "root"
8+
environment = "prod"
9+
route53_zone_name = "imms.prod.vds.platform.nhs.uk" #TBC

infra/kms.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
Sid = "AllowKeyAdministration",
55
Effect = "Allow",
66
Principal = {
7-
AWS = "arn:aws:iam::${var.imms_account_id}:role/${var.admin_role}"
7+
AWS = "arn:aws:iam::${var.imms_account_id}:${var.admin_role}"
88
},
99
Action = [
1010
"kms:Create*",
@@ -30,7 +30,7 @@ locals {
3030
Sid = "KMSKeyUserAccess",
3131
Effect = "Allow",
3232
Principal = {
33-
AWS = "arn:aws:iam::${var.imms_account_id}:role/${var.auto_ops_role}"
33+
AWS = "arn:aws:iam::${var.imms_account_id}:${var.auto_ops_role}"
3434
},
3535
Action = [
3636
"kms:Encrypt",
@@ -43,7 +43,7 @@ locals {
4343
Sid = "KMSKeyUserAccessForDevOps",
4444
Effect = "Allow",
4545
Principal = {
46-
AWS = "arn:aws:iam::${var.imms_account_id}:role/${var.dev_ops_role}"
46+
AWS = "arn:aws:iam::${var.imms_account_id}:${var.dev_ops_role}"
4747
},
4848
Action = [
4949
"kms:Encrypt",

infra/networking.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ resource "aws_route" "igw_route" {
5252
destination_cidr_block = "0.0.0.0/16"
5353
gateway_id = aws_internet_gateway.default.id
5454
}
55+
56+
resource "aws_route53_zone" "hosted_zone" {
57+
name = var.route53_zone_name
58+
}

infra/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ variable "auto_ops_role" {}
88
variable "admin_role" {}
99
variable "dev_ops_role" {}
1010
variable "dspp_admin_role" {}
11+
variable "route53_zone_name" {}
1112
variable "build_agent_account_id" {
1213
default = "958002497996"
1314
}

0 commit comments

Comments
 (0)