Skip to content

Commit

Permalink
Add refactored/simplified config per environment
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux committed Jan 9, 2025
1 parent bbefad8 commit e437418
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 188 deletions.
49 changes: 11 additions & 38 deletions infrastructure/tf-core/environments/development.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
application = "commgt"
environment = "DEV"

features = {
onseeatures = {
acr_enabled = false
api_management_enabled = false
event_grid_enabled = false
Expand Down Expand Up @@ -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"
Expand All @@ -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"
}
}

Expand Down
47 changes: 10 additions & 37 deletions infrastructure/tf-core/environments/integration.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}

Expand Down
47 changes: 10 additions & 37 deletions infrastructure/tf-core/environments/nft.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}

Expand Down
47 changes: 10 additions & 37 deletions infrastructure/tf-core/environments/preprod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}

Expand Down
51 changes: 12 additions & 39 deletions infrastructure/tf-core/environments/production.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
}
}

Expand Down

0 comments on commit e437418

Please sign in to comment.