Skip to content

Commit 28b1b97

Browse files
committed
Look up VPC by name. Disable MESH in preprod. Use correct cert in preprod. Remove unused vars.
1 parent 2686ec6 commit 28b1b97

File tree

6 files changed

+22
-24
lines changed

6 files changed

+22
-24
lines changed

terraform/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/environments/preprod/int-blue/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ immunisation_account_id = "084828561157"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
55
pds_check_enabled = false
6-
create_mesh_processor = true
6+
create_mesh_processor = false
77
has_sub_environment_scope = false

terraform/environments/preprod/int-green/variables.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ immunisation_account_id = "084828561157"
33
dspp_core_account_id = "603871901111"
44
pds_environment = "int"
55
pds_check_enabled = false
6-
create_mesh_processor = true
6+
create_mesh_processor = false
77
has_sub_environment_scope = false

terraform/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ check "private_subnets" {
4747
}
4848

4949
data "aws_vpc" "default" {
50-
default = true
50+
tags = {
51+
Name = "imms-${var.environment}-fhir-api-vpc"
52+
}
5153
}
5254

5355
data "aws_subnets" "all" {

terraform/modules/api_gateway/mtls_cert.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
locals {
22
# NHSD cert file
3-
truststore_file_name = "server-renewed-cert.pem"
3+
truststore_file_name = var.environment == "preprod" ? "imms-int-cert.pem" : "server-renewed-cert.pem"
44
}
55

66
data "aws_s3_bucket" "cert_storage" {

terraform/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ variable "project_short_name" {
1919
default = "imms"
2020
}
2121

22-
variable "use_new_aws_preprod_account" {
23-
default = true
24-
}
2522
variable "service" {
2623
default = "fhir-api"
2724
}
@@ -46,7 +43,6 @@ locals {
4643
prefix = "${var.project_name}-${var.service}-${var.sub_environment}"
4744
short_prefix = "${var.project_short_name}-${var.sub_environment}"
4845
batch_prefix = "immunisation-batch-${var.sub_environment}"
49-
vpc_name = "imms-${var.environment}-fhir-api-vpc"
5046
root_domain_name = "${var.environment}.vds.platform.nhs.uk"
5147
project_domain_name = "imms.${local.root_domain_name}"
5248
service_domain_name = "${var.sub_environment}.${local.project_domain_name}"

0 commit comments

Comments
 (0)