diff --git a/infrastructure/tf-audit/environments/integration.tfvars b/infrastructure/tf-audit/environments/integration.tfvars index 73f2c33ac..39dc11d8e 100644 --- a/infrastructure/tf-audit/environments/integration.tfvars +++ b/infrastructure/tf-audit/environments/integration.tfvars @@ -60,6 +60,26 @@ storage_accounts = { container_access_type = "private" } } - + } + sqlbackups = { + name_suffix = "sqlbackups" + account_tier = "Standard" + replication_type = "LRS" + public_network_access_enabled = false + blob_properties_delete_retention_policy = 7 + blob_properties_versioning_enabled = true + access_tier = "Cold" + containers = { + sql-backups-immutable = { + container_name = "sql-backups-immutable" + container_access_type = "private" + immutability_policy = { + is_locked = false + immutability_period_in_days = 1 + protected_append_writes_all_enabled = false + protected_append_writes_enabled = false + } + } + } } } diff --git a/infrastructure/tf-audit/environments/nft.tfvars b/infrastructure/tf-audit/environments/nft.tfvars index 1a32f5e23..afd615e70 100644 --- a/infrastructure/tf-audit/environments/nft.tfvars +++ b/infrastructure/tf-audit/environments/nft.tfvars @@ -52,6 +52,26 @@ storage_accounts = { container_access_type = "private" } } - + } + sqlbackups = { + name_suffix = "sqlbackups" + account_tier = "Standard" + replication_type = "LRS" + public_network_access_enabled = false + blob_properties_delete_retention_policy = 7 + blob_properties_versioning_enabled = true + access_tier = "Cold" + containers = { + sql-backups-immutable = { + container_name = "sql-backups-immutable" + container_access_type = "private" + immutability_policy = { + is_locked = false + immutability_period_in_days = 1 + protected_append_writes_all_enabled = false + protected_append_writes_enabled = false + } + } + } } } diff --git a/infrastructure/tf-audit/environments/preprod.tfvars b/infrastructure/tf-audit/environments/preprod.tfvars index bd7cfe8d3..d771bb30c 100644 --- a/infrastructure/tf-audit/environments/preprod.tfvars +++ b/infrastructure/tf-audit/environments/preprod.tfvars @@ -79,4 +79,25 @@ storage_accounts = { } } } + sqlbackups = { + name_suffix = "sqlbackups" + account_tier = "Standard" + replication_type = "LRS" + public_network_access_enabled = false + blob_properties_delete_retention_policy = 7 + blob_properties_versioning_enabled = true + access_tier = "Cold" + containers = { + sql-backups-immutable = { + container_name = "sql-backups-immutable" + container_access_type = "private" + immutability_policy = { + is_locked = false + immutability_period_in_days = 1 + protected_append_writes_all_enabled = false + protected_append_writes_enabled = false + } + } + } + } } diff --git a/infrastructure/tf-audit/environments/sandbox.tfvars b/infrastructure/tf-audit/environments/sandbox.tfvars index 52ec87919..ed665d2e7 100644 --- a/infrastructure/tf-audit/environments/sandbox.tfvars +++ b/infrastructure/tf-audit/environments/sandbox.tfvars @@ -52,6 +52,17 @@ storage_accounts = { container_name = "vulnerability-assessment" container_access_type = "private" } + } + } + sqlbackups = { + name_suffix = "sqlbackups" + account_tier = "Standard" + replication_type = "LRS" + public_network_access_enabled = false + blob_properties_delete_retention_policy = 7 + blob_properties_versioning_enabled = true + access_tier = "Cold" + containers = { sql-backups-immutable = { container_name = "sql-backups-immutable" container_access_type = "private" diff --git a/infrastructure/tf-core/environments/sandbox.tfvars b/infrastructure/tf-core/environments/sandbox.tfvars index 42271d6ec..bb747ad0d 100644 --- a/infrastructure/tf-core/environments/sandbox.tfvars +++ b/infrastructure/tf-core/environments/sandbox.tfvars @@ -148,28 +148,11 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" capacity_max = "1" capacity_def = "1" - time_grain = "PT1M" - statistic = "Average" - time_window = "PT1M" - time_aggregation = "Average" - - inc_operator = "GreaterThanOrEqual" - inc_threshold = 20 - inc_scale_direction = "Increase" - inc_scale_type = "ExactCount" - inc_scale_value = 1 - inc_scale_cooldown = "PT10M" - - dec_operator = "LessThan" - dec_threshold = 20 - dec_scale_direction = "Decrease" - dec_scale_type = "ExactCount" - dec_scale_value = 1 - dec_scale_cooldown = "PT5M" + inc_scale_value = 1 + dec_scale_value = 1 } } @@ -180,12 +163,7 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" - capacity_max = "5" - capacity_def = "1" - - inc_threshold = 5 - dec_threshold = 5 + capacity_max = "5" inc_scale_value = 5 dec_scale_type = "ChangeCount" @@ -199,28 +177,11 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" capacity_max = "1" capacity_def = "1" - time_grain = "PT1M" - statistic = "Average" - time_window = "PT1M" - time_aggregation = "Average" - - inc_operator = "GreaterThanOrEqual" - inc_threshold = 20 - inc_scale_direction = "Increase" - inc_scale_type = "ExactCount" - inc_scale_value = 1 - inc_scale_cooldown = "PT10M" - - dec_operator = "LessThan" - dec_threshold = 20 - dec_scale_direction = "Decrease" - dec_scale_type = "ExactCount" - dec_scale_value = 1 - dec_scale_cooldown = "PT5M" + inc_scale_value = 1 + dec_scale_value = 1 } } @@ -231,12 +192,7 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" - capacity_max = "5" - capacity_def = "1" - - inc_threshold = 5 - dec_threshold = 5 + capacity_max = "5" inc_scale_value = 5 dec_scale_type = "ChangeCount" @@ -250,12 +206,7 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" - capacity_max = "3" - capacity_def = "1" - - inc_threshold = 5 - dec_threshold = 5 + capacity_max = "3" inc_scale_value = 3 dec_scale_type = "ChangeCount" @@ -269,12 +220,8 @@ app_service_plan = { scaling_rule = { metric = "CpuPercentage" - capacity_min = "1" capacity_max = "3" - capacity_def = "1" - inc_threshold = 5 - dec_threshold = 5 inc_scale_value = 3 dec_scale_type = "ChangeCount" @@ -289,7 +236,8 @@ app_service_plan = { container_app_environments = { instances = { db-management = { - zone_redundancy_enabled = false + zone_redundancy_enabled = false + use_custom_infra_rg_name = false } } } @@ -302,6 +250,23 @@ container_app_jobs = { container_registry_use_mi = true db_connection_string_name = "DtOsDatabaseConnectionString" add_user_assigned_identity = true + replica_retry_limit = 1 + } + } +} + +container_apps = { + apps = { + wiremock = { + container_app_environment_key = "db-management" + docker_image = "cohort-manager-wiremock" + container_registry_use_mi = true + add_user_assigned_identity = false + is_tcp_app = false + is_web_app = true + port = 8080 + infra_key_vault_rg = null + infra_key_vault_name = null } } } @@ -1095,10 +1060,10 @@ function_apps = { } ] env_vars_static = { - RetrievePdsParticipantURL = "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient" + RetrievePdsParticipantURL = "https://sandbox.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient" Kid = "RetrievePdsDemographic-DEV1" - Audience = "https://int.api.service.nhs.uk/oauth2/token" - AuthTokenURL = "https://int.api.service.nhs.uk/oauth2/token" + Audience = "https://sandbox.api.service.nhs.uk/oauth2/token" + AuthTokenURL = "https://sandbox.api.service.nhs.uk/oauth2/token" KeyNamePrivateKey = "PDSPRIVATEKEY" UseFakePDSServices = "true" ParticipantManagementTopic = "participant-management" @@ -1126,6 +1091,7 @@ function_apps = { NemsSubscriptionProfile = "https://fhir.nhs.uk/STU3/StructureDefinition/EMS-Subscription-1" NemsSubscriptionCriteria = "https://fhir.nhs.uk/Id/nhs-number" NemsBypassServerCertificateValidation = "true" + IsStubbed = "true" } } @@ -1256,6 +1222,7 @@ linux_web_app = { AUTH_TRUST_HOST = "true" NEXTAUTH_URL = "https://cohort-dev.non-live.screening.nhs.uk/api/auth" SERVICE_NAME = "Cohort Manager" + APP_ENV = "sandbox" } from_key_vault = { # env_var_name = "key_vault_secret_name" @@ -1356,7 +1323,7 @@ sqlserver = { licence_type = "LicenseIncluded" max_gb = 30 read_scale = false - sku = "S1" + sku = "S0" storage_account_type = "Local" zone_redundant = false }