Skip to content

Commit 854947f

Browse files
committed
PDS check variable
1 parent 175ee54 commit 854947f

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

terraform/endpoints.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ locals {
2727
"IMMUNIZATION_BASE_PATH" = strcontains(terraform.workspace, "pr-") ? "immunisation-fhir-api-${terraform.workspace}" : "immunisation-fhir-api"
2828
# except for prod and ref, any other env uses PDS int environment
2929
"PDS_ENV" = var.pds_environment
30-
"PDS_CHECK_ENABLED" = tostring(var.environment != "int")
30+
"PDS_CHECK_ENABLED" = tostring(var.pds_check_enabled)
3131
"SPLUNK_FIREHOSE_NAME" = module.splunk.firehose_stream_name
3232
"SQS_QUEUE_URL" = "https://sqs.eu-west-2.amazonaws.com/${var.immunisation_account_id}/${local.short_prefix}-ack-metadata-queue.fifo"
3333
"REDIS_HOST" = data.aws_elasticache_cluster.existing_redis.cache_nodes[0].address

terraform/environments/int/blue/variables.tfvars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ environment = "int"
22
sub_environment = "blue"
33
immunisation_account_id = "084828561157"
44
dspp_core_account_id = "603871901111"
5+
pds_check_enabled = false

terraform/environments/int/green/variables.tfvars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ environment = "int"
22
sub_environment = "green"
33
immunisation_account_id = "084828561157"
44
dspp_core_account_id = "603871901111"
5+
pds_check_enabled = false

terraform/environments/non-prod/int/variables.tfvars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ environment = "dev"
22
sub_environment = "int"
33
immunisation_account_id = "345594581768"
44
dspp_core_account_id = "603871901111"
5+
pds_check_enabled = false

terraform/modules/api_gateway/api.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
resource "aws_apigatewayv2_api" "service_api" {
33
name = "${var.prefix}-api"
4-
description = "Immunisation FHIR API - ${var.environment}"
4+
description = "Immunisation FHIR API - ${var.sub_environment}"
55
protocol_type = "HTTP"
66
disable_execute_api_endpoint = true
77
body = var.oas
@@ -10,7 +10,7 @@ resource "aws_apigatewayv2_api" "service_api" {
1010
resource "aws_apigatewayv2_stage" "default" {
1111
depends_on = [aws_cloudwatch_log_group.api_access_log]
1212
api_id = aws_apigatewayv2_api.service_api.id
13-
name = var.environment
13+
name = var.sub_environment
1414
auto_deploy = true
1515

1616
default_route_settings {

terraform/modules/api_gateway/logs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_cloudwatch_log_group" "api_access_log" {
2-
name = "/aws/vendedlogs/${aws_apigatewayv2_api.service_api.id}/${var.environment}"
2+
name = "/aws/vendedlogs/${aws_apigatewayv2_api.service_api.id}/${var.sub_environment}"
33
retention_in_days = 30
44
}
55

terraform/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ variable "pds_environment" {
3030
default = "int"
3131
}
3232

33+
variable "pds_check_enabled" {
34+
default = true
35+
}
36+
3337
variable "root_domain" {
3438
default = "imms.dev.vds.platform.nhs.uk"
3539
}

0 commit comments

Comments
 (0)