From e4374183bbf8fef118c114ab85a7a3c17427a1f3 Mon Sep 17 00:00:00 2001 From: Steve Laing Date: Tue, 7 Jan 2025 15:18:08 +0000 Subject: [PATCH] Add refactored/simplified config per environment --- .../tf-core/environments/development.tfvars | 49 ++++-------------- .../tf-core/environments/integration.tfvars | 47 ++++------------- .../tf-core/environments/nft.tfvars | 47 ++++------------- .../tf-core/environments/preprod.tfvars | 47 ++++------------- .../tf-core/environments/production.tfvars | 51 +++++-------------- 5 files changed, 53 insertions(+), 188 deletions(-) diff --git a/infrastructure/tf-core/environments/development.tfvars b/infrastructure/tf-core/environments/development.tfvars index b800f3d..b736fb4 100644 --- a/infrastructure/tf-core/environments/development.tfvars +++ b/infrastructure/tf-core/environments/development.tfvars @@ -1,7 +1,7 @@ application = "commgt" environment = "DEV" -features = { +onseeatures = { acr_enabled = false api_management_enabled = false event_grid_enabled = false @@ -124,7 +124,7 @@ app_service_plan = { } } -function_apps = { +function_app = { acr_mi_name = "dtos-communication-management-acr-push" acr_name = "acrukshubdevcommgt" acr_rg_name = "rg-hub-dev-uks-commgt" @@ -147,42 +147,15 @@ function_apps = { storage_uses_managed_identity = null worker_32bit = false - fa_config = { - - message-status = { - name_suffix = "message-status" - function_endpoint_name = "MessageStatus" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = {} - } - - notify = { - name_suffix = "notify" - function_endpoint_name = "Notify" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = { - NOTIFY_API_URL = "https://int.api.service.nhs.uk" - OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" - ENVIRONMENT = "DEVELOPMENT" - } - } - - process-pilot-data = { - name_suffix = "process-pilot-data" - function_endpoint_name = "ProcessPilotData" - key_vault_url = "KEY_VAULT_URL" - app_service_plan_key = "Default" - app_urls = [] - env_vars_static = { - BLOB_CONTAINER_NAME = "pilot-data" - } - } + name_suffix = "communication-management" + function_endpoint_name = "CommunicationManagement" + app_service_plan_key = "Default" + key_vault_url = "KEY_VAULT_URL" + app_urls = [] + env_vars_static = { + NOTIFY_API_URL = "https://int.api.service.nhs.uk" + OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" + ENVIRONMENT = "DEVELOPMENT" } } diff --git a/infrastructure/tf-core/environments/integration.tfvars b/infrastructure/tf-core/environments/integration.tfvars index d4c1488..5f00a16 100644 --- a/infrastructure/tf-core/environments/integration.tfvars +++ b/infrastructure/tf-core/environments/integration.tfvars @@ -124,7 +124,7 @@ app_service_plan = { } } -function_apps = { +function_app = { acr_mi_name = "dtos-communication-management-acr-push" acr_name = "acrukshubdevcommgt" acr_rg_name = "rg-hub-dev-uks-commgt" @@ -147,42 +147,15 @@ function_apps = { storage_uses_managed_identity = null worker_32bit = false - fa_config = { - - message-status = { - name_suffix = "message-status" - function_endpoint_name = "MessageStatus" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = {} - } - - notify = { - name_suffix = "notify" - function_endpoint_name = "Notify" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = { - NOTIFY_API_URL = "https://int.api.service.nhs.uk" - OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" - ENVIRONMENT = "INTEGRATION" - } - } - - process-pilot-data = { - name_suffix = "process-pilot-data" - function_endpoint_name = "ProcessPilotData" - key_vault_url = "KEY_VAULT_URL" - app_service_plan_key = "Default" - app_urls = [] - env_vars_static = { - BLOB_CONTAINER_NAME = "pilot-data" - } - } + name_suffix = "communication-management" + function_endpoint_name = "CommunicationManagement" + app_service_plan_key = "Default" + key_vault_url = "KEY_VAULT_URL" + app_urls = [] + env_vars_static = { + NOTIFY_API_URL = "https://int.api.service.nhs.uk" + OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" + ENVIRONMENT = "INTEGRATION" } } diff --git a/infrastructure/tf-core/environments/nft.tfvars b/infrastructure/tf-core/environments/nft.tfvars index 461bc94..66d8677 100644 --- a/infrastructure/tf-core/environments/nft.tfvars +++ b/infrastructure/tf-core/environments/nft.tfvars @@ -124,7 +124,7 @@ app_service_plan = { } } -function_apps = { +function_app = { acr_mi_name = "dtos-communication-management-acr-push" acr_name = "acrukshubdevcommgt" acr_rg_name = "rg-hub-dev-uks-commgt" @@ -147,42 +147,15 @@ function_apps = { storage_uses_managed_identity = null worker_32bit = false - fa_config = { - - message-status = { - name_suffix = "message-status" - function_endpoint_name = "MessageStatus" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = {} - } - - notify = { - name_suffix = "notify" - function_endpoint_name = "Notify" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = { - NOTIFY_API_URL = "https://int.api.service.nhs.uk" - OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" - ENVIRONMENT = "NFT" - } - } - - process-pilot-data = { - name_suffix = "process-pilot-data" - function_endpoint_name = "ProcessPilotData" - key_vault_url = "KEY_VAULT_URL" - app_service_plan_key = "Default" - app_urls = [] - env_vars_static = { - BLOB_CONTAINER_NAME = "pilot-data" - } - } + name_suffix = "communication-management" + function_endpoint_name = "CommunicationManagement" + app_service_plan_key = "Default" + key_vault_url = "KEY_VAULT_URL" + app_urls = [] + env_vars_static = { + NOTIFY_API_URL = "https://int.api.service.nhs.uk" + OAUTH2_TOKEN_URL = "https://int.api.service.nhs.uk/oauth2/token" + ENVIRONMENT = "DEVELOPMENT" } } diff --git a/infrastructure/tf-core/environments/preprod.tfvars b/infrastructure/tf-core/environments/preprod.tfvars index e81cd75..745a703 100644 --- a/infrastructure/tf-core/environments/preprod.tfvars +++ b/infrastructure/tf-core/environments/preprod.tfvars @@ -124,7 +124,7 @@ app_service_plan = { } } -function_apps = { +function_app = { acr_mi_name = "dtos-communication-management-acr-push" acr_name = "acrukshubprodcommgt" acr_rg_name = "rg-hub-prod-uks-commgt" @@ -147,42 +147,15 @@ function_apps = { storage_uses_managed_identity = null worker_32bit = false - fa_config = { - - message-status = { - name_suffix = "message-status" - function_endpoint_name = "MessageStatus" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = {} - } - - notify = { - name_suffix = "notify" - function_endpoint_name = "Notify" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = { - NOTIFY_API_URL = "https://api.service.nhs.uk" - OAUTH2_TOKEN_URL = "https://api.service.nhs.uk/oauth2/token" - ENVIRONMENT = "PRE_PRODUCTION" - } - } - - process-pilot-data = { - name_suffix = "process-pilot-data" - function_endpoint_name = "ProcessPilotData" - key_vault_url = "KEY_VAULT_URL" - app_service_plan_key = "Default" - app_urls = [] - env_vars_static = { - BLOB_CONTAINER_NAME = "pilot-data" - } - } + name_suffix = "communication-management" + function_endpoint_name = "CommunicationManagement" + app_service_plan_key = "Default" + key_vault_url = "KEY_VAULT_URL" + app_urls = [] + env_vars_static = { + NOTIFY_API_URL = "https://api.service.nhs.uk" + OAUTH2_TOKEN_URL = "https://api.service.nhs.uk/oauth2/token" + ENVIRONMENT = "PRE_PRODUCTION" } } diff --git a/infrastructure/tf-core/environments/production.tfvars b/infrastructure/tf-core/environments/production.tfvars index d384c59..90ea9f2 100644 --- a/infrastructure/tf-core/environments/production.tfvars +++ b/infrastructure/tf-core/environments/production.tfvars @@ -124,13 +124,13 @@ app_service_plan = { } } -function_apps = { +function_app = { acr_mi_name = "dtos-communication-management-acr-push" acr_name = "acrukshubprodcommgt" acr_rg_name = "rg-hub-prod-uks-commgt" - app_insights_name = "appi-prd-uks-commgt" - app_insights_rg_name = "rg-commgt-prd-uks-audit" + app_insights_name = "appi-pre-uks-commgt" + app_insights_rg_name = "rg-commgt-pre-uks-audit" always_on = true @@ -147,42 +147,15 @@ function_apps = { storage_uses_managed_identity = null worker_32bit = false - fa_config = { - - message-status = { - name_suffix = "message-status" - function_endpoint_name = "MessageStatus" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = {} - } - - notify = { - name_suffix = "notify" - function_endpoint_name = "Notify" - app_service_plan_key = "Default" - key_vault_url = "KEY_VAULT_URL" - database_required = true - app_urls = [] - env_vars_static = { - NOTIFY_API_URL = "https://api.service.nhs.uk" - OAUTH2_TOKEN_URL = "https://api.service.nhs.uk/oauth2/token" - ENVIRONMENT = "PRODUCTION" - } - } - - process-pilot-data = { - name_suffix = "process-pilot-data" - function_endpoint_name = "ProcessPilotData" - key_vault_url = "KEY_VAULT_URL" - app_service_plan_key = "Default" - app_urls = [] - env_vars_static = { - BLOB_CONTAINER_NAME = "pilot-data" - } - } + name_suffix = "communication-management" + function_endpoint_name = "CommunicationManagement" + app_service_plan_key = "Default" + key_vault_url = "KEY_VAULT_URL" + app_urls = [] + env_vars_static = { + NOTIFY_API_URL = "https://api.service.nhs.uk" + OAUTH2_TOKEN_URL = "https://api.service.nhs.uk/oauth2/token" + ENVIRONMENT = "PRODUCTION" } }