From df344ab6f9dde00a6f95bc607144ca827ce9957b Mon Sep 17 00:00:00 2001 From: Abigail McPhillips Date: Thu, 9 May 2024 12:00:37 +0100 Subject: [PATCH] Tidy up generated files - Rename development config files to test config - Replace some missing constants - Domain bits are still missing, not needed right now: #FRONT_DOOR_NAME# #DOMAINS_RESOURCE_GROUP_NAME# - Remove Redis module --- .../config/development.tfvars.json | 7 ------- .../application/config/production.tfvars.json | 14 ++++++------- .../application/config/review.tfvars.json | 8 ++++---- terraform/application/config/test.tfvars.json | 7 +++++++ .../{development_Terrafile => test_Terrafile} | 0 terraform/application/database.tf | 17 ---------------- .../config/development.tfvars.json | 16 --------------- .../config/production.tfvars.json | 12 ++++------- .../config/test.tfvars.json | 12 +++++++++++ .../{development_Terrafile => test_Terrafile} | 0 .../infrastructure/config/zones.tfvars.json | 20 +++++++++---------- 11 files changed, 44 insertions(+), 69 deletions(-) delete mode 100644 terraform/application/config/development.tfvars.json create mode 100644 terraform/application/config/test.tfvars.json rename terraform/application/config/{development_Terrafile => test_Terrafile} (100%) delete mode 100644 terraform/domains/environment_domains/config/development.tfvars.json create mode 100644 terraform/domains/environment_domains/config/test.tfvars.json rename terraform/domains/environment_domains/config/{development_Terrafile => test_Terrafile} (100%) diff --git a/terraform/application/config/development.tfvars.json b/terraform/application/config/development.tfvars.json deleted file mode 100644 index 4396a11152..0000000000 --- a/terraform/application/config/development.tfvars.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "cluster": "test", - "namespace": "#NAMESPACE_PREFIX#-development", - "environment": "development", - "deploy_azure_backing_services": false, - "enable_postgres_ssl" : false -} diff --git a/terraform/application/config/production.tfvars.json b/terraform/application/config/production.tfvars.json index 370a677dd3..25bc897d9a 100644 --- a/terraform/application/config/production.tfvars.json +++ b/terraform/application/config/production.tfvars.json @@ -1,9 +1,9 @@ { - "cluster": "production", - "namespace": "#NAMESPACE_PREFIX#-production", - "environment": "production", - "enable_postgres_backup_storage" : true, - "enable_monitoring": true, - "external_url": "https://#DNS_ZONE_NAME#/healthcheck", - "statuscake_contact_groups": [282453] + "cluster": "production", + "namespace": "srtl-production", + "environment": "production", + "enable_postgres_backup_storage": true, + "enable_monitoring": true, + "external_url": "https://claim-additional-teaching-payment.service.gov.uk/healthcheck", + "statuscake_contact_groups": [282453] } diff --git a/terraform/application/config/review.tfvars.json b/terraform/application/config/review.tfvars.json index f2f3ba3007..ac1f382e51 100644 --- a/terraform/application/config/review.tfvars.json +++ b/terraform/application/config/review.tfvars.json @@ -1,6 +1,6 @@ { - "cluster": "test", - "namespace": "#NAMESPACE_PREFIX#-development", - "deploy_azure_backing_services": false, - "enable_postgres_ssl" : false + "cluster": "test", + "namespace": "srtl-development", + "deploy_azure_backing_services": false, + "enable_postgres_ssl": false } diff --git a/terraform/application/config/test.tfvars.json b/terraform/application/config/test.tfvars.json new file mode 100644 index 0000000000..7c1ad83f1b --- /dev/null +++ b/terraform/application/config/test.tfvars.json @@ -0,0 +1,7 @@ +{ + "cluster": "test", + "namespace": "srtl-test", + "environment": "test", + "deploy_azure_backing_services": false, + "enable_postgres_ssl": false +} diff --git a/terraform/application/config/development_Terrafile b/terraform/application/config/test_Terrafile similarity index 100% rename from terraform/application/config/development_Terrafile rename to terraform/application/config/test_Terrafile diff --git a/terraform/application/database.tf b/terraform/application/database.tf index b87af9e531..b8da6665df 100644 --- a/terraform/application/database.tf +++ b/terraform/application/database.tf @@ -13,20 +13,3 @@ module "postgres" { azure_enable_backup_storage = var.enable_postgres_backup_storage server_version = "14" } - - -module "redis-cache" { - source = "./vendor/modules/aks//aks/redis" - - namespace = var.namespace - environment = var.environment - azure_resource_prefix = var.azure_resource_prefix - service_short = var.service_short - config_short = var.config_short - service_name = var.service_name - cluster_configuration_map = module.cluster_data.configuration_map - use_azure = var.deploy_azure_backing_services - azure_enable_monitoring = var.enable_monitoring - azure_patch_schedule = [{ "day_of_week" : "Sunday", "start_hour_utc" : 01 }] - server_version = "6" -} diff --git a/terraform/domains/environment_domains/config/development.tfvars.json b/terraform/domains/environment_domains/config/development.tfvars.json deleted file mode 100644 index 94f5e4fc94..0000000000 --- a/terraform/domains/environment_domains/config/development.tfvars.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "hosted_zone": { - "#DNS_ZONE_NAME#": { - "front_door_name": "#FRONT_DOOR_NAME#", - "resource_group_name": "#DOMAINS_RESOURCE_GROUP_NAME#", - "domains": [ - "development" - ], - "cached_paths": [ - "/assets/*" - ], - "environment_short": "dv", - "origin_hostname": "#SERVICE_NAME#-development.test.teacherservices.cloud" - } - } -} diff --git a/terraform/domains/environment_domains/config/production.tfvars.json b/terraform/domains/environment_domains/config/production.tfvars.json index c6a84880f2..bb37dcca10 100644 --- a/terraform/domains/environment_domains/config/production.tfvars.json +++ b/terraform/domains/environment_domains/config/production.tfvars.json @@ -1,16 +1,12 @@ { "hosted_zone": { - "#DNS_ZONE_NAME#": { + "claim-additional-teaching-payment.service.gov.uk": { "front_door_name": "#FRONT_DOOR_NAME#", "resource_group_name": "#DOMAINS_RESOURCE_GROUP_NAME#", - "domains": [ - "apex" - ], - "cached_paths": [ - "/assets/*" - ], + "domains": ["apex"], + "cached_paths": ["/assets/*"], "environment_short": "pd", - "origin_hostname": "#SERVICE_NAME#-production.teacherservices.cloud" + "origin_hostname": "claim-additional-payments-for-teaching-production.teacherservices.cloud" } } } diff --git a/terraform/domains/environment_domains/config/test.tfvars.json b/terraform/domains/environment_domains/config/test.tfvars.json new file mode 100644 index 0000000000..ec5ad7b7c6 --- /dev/null +++ b/terraform/domains/environment_domains/config/test.tfvars.json @@ -0,0 +1,12 @@ +{ + "hosted_zone": { + "claim-additional-teaching-payment.service.gov.uk": { + "front_door_name": "#FRONT_DOOR_NAME#", + "resource_group_name": "#DOMAINS_RESOURCE_GROUP_NAME#", + "domains": ["test"], + "cached_paths": ["/assets/*"], + "environment_short": "test", + "origin_hostname": "claim-additional-payments-for-teaching-test.test.teacherservices.cloud" + } + } +} diff --git a/terraform/domains/environment_domains/config/development_Terrafile b/terraform/domains/environment_domains/config/test_Terrafile similarity index 100% rename from terraform/domains/environment_domains/config/development_Terrafile rename to terraform/domains/environment_domains/config/test_Terrafile diff --git a/terraform/domains/infrastructure/config/zones.tfvars.json b/terraform/domains/infrastructure/config/zones.tfvars.json index eb2e2f1a7e..fe0910df0a 100644 --- a/terraform/domains/infrastructure/config/zones.tfvars.json +++ b/terraform/domains/infrastructure/config/zones.tfvars.json @@ -1,11 +1,11 @@ { - "hosted_zone": { - "#DNS_ZONE_NAME#": { - "caa_records": {}, - "txt_records": {}, - "resource_group_name": "#DOMAINS_RESOURCE_GROUP_NAME#", - "front_door_name": "#FRONT_DOOR_NAME#" - } - }, - "deploy_default_records": false - } + "hosted_zone": { + "claim-additional-teaching-payment.service.gov.uk": { + "caa_records": {}, + "txt_records": {}, + "resource_group_name": "#DOMAINS_RESOURCE_GROUP_NAME#", + "front_door_name": "#FRONT_DOOR_NAME#" + } + }, + "deploy_default_records": false +}