Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e50bb73
Initial check in for PITR yml file
ste-banks Apr 22, 2026
3faddea
Moving location of file
ste-banks Apr 22, 2026
0bbe4af
Stop app services for dev only - WIP
ste-banks Apr 22, 2026
b513f64
adding validation and PITR stages to new PITR pipeline
Dave-O-NHS Apr 23, 2026
b32c66f
udating resourceGroup and accountName
Dave-O-NHS Apr 23, 2026
4010c50
updating azure subscription
Dave-O-NHS Apr 23, 2026
c7a6970
fixing pipeline triggering on every push
Dave-O-NHS Apr 23, 2026
07db01c
changing subscription
Dave-O-NHS Apr 23, 2026
50a8772
fixing scriptType
Dave-O-NHS Apr 23, 2026
e2a97ec
fixing parameter name
Dave-O-NHS Apr 23, 2026
7c2b360
Updating script to stop aggregator and audit container apps as well
ste-banks Apr 24, 2026
2bfb5f9
converting UK local time to UTC
Dave-O-NHS Apr 24, 2026
fa1b80c
Adding subscriptionId
ste-banks Apr 24, 2026
ef5b696
Fix typo
ste-banks Apr 27, 2026
c58bf91
Update to script to use az CLI
ste-banks Apr 27, 2026
75b49a3
Rename display name
ste-banks Apr 27, 2026
d6bdf38
creating keyvault and allowing PITR to set active db name
Dave-O-NHS Apr 27, 2026
6a7a341
Update to stopping container apps in script
ste-banks Apr 27, 2026
3eeb5f3
Update to set max-replicas to 1 - effectively stopping the container …
ste-banks Apr 27, 2026
0d5b67c
Merge David O changes and resolve conflict with APPT-2315 script
pchoi-al Apr 27, 2026
4c6217a
Merge branch 'appt-1652/point-in-time-restore-pipeline' of https://gi…
pchoi-al Apr 27, 2026
9bca116
Deactivating revisions within the container app instead
ste-banks Apr 27, 2026
50f8b9a
fixing date issue
Dave-O-NHS Apr 28, 2026
3e66ba5
Query update
ste-banks Apr 28, 2026
2103a8e
updating active db in key vault
Dave-O-NHS Apr 28, 2026
197f184
Stopping the booking and capacity extract jobs
ste-banks Apr 28, 2026
508fbe2
Integrate RestartServices stage with Environment approval and start c…
pchoi-al Apr 28, 2026
1ade9d2
updating active db config file
Dave-O-NHS Apr 29, 2026
2e2cdf8
Change to delete the container app jobs instead of stopping
ste-banks Apr 29, 2026
ea26559
changing parameter name for enabling rbac on key vault
Dave-O-NHS Apr 29, 2026
b5b205a
fixing key vault creation
Dave-O-NHS Apr 29, 2026
320aa7d
Change to ensure container app jobs get deleted, also updating log msg
ste-banks Apr 29, 2026
0bf5322
Fix typo
ste-banks Apr 29, 2026
24ff817
Refactor RestartServices to use vaccs
pchoi-al Apr 29, 2026
b026106
Add script for RestartServices
pchoi-al Apr 29, 2026
df84e50
Adding script to activate revisions within the container apps that we…
ste-banks Apr 29, 2026
e4d6e72
Arguments fixup
ste-banks Apr 29, 2026
66b937d
Added step, checkout: self
pchoi-al Apr 29, 2026
d0029ee
Initial check in for PITR yml file
ste-banks Apr 22, 2026
4baff94
Moving location of file
ste-banks Apr 22, 2026
b639317
Stop app services for dev only - WIP
ste-banks Apr 22, 2026
495f61e
adding validation and PITR stages to new PITR pipeline
Dave-O-NHS Apr 23, 2026
7034125
udating resourceGroup and accountName
Dave-O-NHS Apr 23, 2026
c086eec
updating azure subscription
Dave-O-NHS Apr 23, 2026
3d9dfc6
fixing pipeline triggering on every push
Dave-O-NHS Apr 23, 2026
74a5cf0
changing subscription
Dave-O-NHS Apr 23, 2026
e8b9529
fixing scriptType
Dave-O-NHS Apr 23, 2026
fd6b731
fixing parameter name
Dave-O-NHS Apr 23, 2026
3fcb779
Updating script to stop aggregator and audit container apps as well
ste-banks Apr 24, 2026
37e2677
converting UK local time to UTC
Dave-O-NHS Apr 24, 2026
8b6a28f
Adding subscriptionId
ste-banks Apr 24, 2026
7af901f
Fix typo
ste-banks Apr 27, 2026
4a716b4
Update to script to use az CLI
ste-banks Apr 27, 2026
a604400
Rename display name
ste-banks Apr 27, 2026
46041e0
creating keyvault and allowing PITR to set active db name
Dave-O-NHS Apr 27, 2026
e81c900
Merge David O changes and resolve conflict with APPT-2315 script
pchoi-al Apr 27, 2026
e6cd2f8
Update to stopping container apps in script
ste-banks Apr 27, 2026
8a1c0c1
Update to set max-replicas to 1 - effectively stopping the container …
ste-banks Apr 27, 2026
1256ae8
Deactivating revisions within the container app instead
ste-banks Apr 27, 2026
b1c0339
fixing date issue
Dave-O-NHS Apr 28, 2026
06d4804
Query update
ste-banks Apr 28, 2026
4137f22
updating active db in key vault
Dave-O-NHS Apr 28, 2026
a5c9fba
Stopping the booking and capacity extract jobs
ste-banks Apr 28, 2026
ce37895
Integrate RestartServices stage with Environment approval and start c…
pchoi-al Apr 28, 2026
2d33a88
updating active db config file
Dave-O-NHS Apr 29, 2026
7019dc3
Change to delete the container app jobs instead of stopping
ste-banks Apr 29, 2026
d8151fd
changing parameter name for enabling rbac on key vault
Dave-O-NHS Apr 29, 2026
9494d84
fixing key vault creation
Dave-O-NHS Apr 29, 2026
79553d2
Change to ensure container app jobs get deleted, also updating log msg
ste-banks Apr 29, 2026
4a6f938
Fix typo
ste-banks Apr 29, 2026
ffe64fc
Refactor RestartServices to use vaccs
pchoi-al Apr 29, 2026
7c1194b
Add script for RestartServices
pchoi-al Apr 29, 2026
6471f8c
Adding script to activate revisions within the container apps that we…
ste-banks Apr 29, 2026
eae70a3
Arguments fixup
ste-banks Apr 29, 2026
294fb69
Added step, checkout: self
pchoi-al Apr 29, 2026
d04440e
Merge branch 'appt-1652/point-in-time-restore-pipeline' of https://gi…
pchoi-al Apr 29, 2026
50b18dc
loading endpoint and token from key vault
Dave-O-NHS Apr 30, 2026
310a2cb
container apps and data extracts load key vault
Dave-O-NHS Apr 30, 2026
f328edb
Creating a new audit blob storage account and updating the container …
ste-banks Apr 30, 2026
5aac57e
fixing configuration issues
Dave-O-NHS May 1, 2026
360bf81
fix
Dave-O-NHS May 1, 2026
9abe0cb
Added a stage to take active DB offline
pchoi-al May 1, 2026
97d2e2c
Update restart step's depend on
ste-banks May 1, 2026
7c159d3
Fix
ste-banks May 1, 2026
aeee702
adding role assignment for new key vault
Dave-O-NHS May 1, 2026
5b1cf01
Formatting change - also adding error
ste-banks May 1, 2026
1326856
Changing to single line command as pipeline is giving syntax errors a…
ste-banks May 1, 2026
a65652f
Update depends on
ste-banks May 1, 2026
87e4dc8
Removing spaces
ste-banks May 1, 2026
251124d
terraform issues
Dave-O-NHS May 1, 2026
3d13444
terraform issue
Dave-O-NHS May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions azure-pipelines-pitr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
trigger: none
pr: none

pool:
vmImage: "ubuntu-latest"

parameters:
- name: RestoreDateTime
displayName: "Target Restore Date/Time (UK LOCAL TIME)"
type: string
default: "2026-04-24 10:00:00" # a template for the user

stages:
- stage: Validation
displayName: "Pre-Flight Validation"
jobs:
- job: ValidateInput
steps:
- task: AzureCLI@2
name: ValidateStep
displayName: "Validate Restore Window"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/validate-cosmos-pitr.ps1"
arguments: >
-sourceAccount "vaccs-mya-cdb-dev-uks"
-resourceGroup "vaccs-mya-dev-uks"
-restoreDateAndTimeStr "${{ parameters.RestoreDateTime }}"

- stage: StopWebApp
displayName: "Stop Applications"
dependsOn: Validation
jobs:
- job: StopApps
steps:
- task: AzureCLI@2
displayName: "Stop Applications"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: scriptPath
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/stop-dev-app-services.ps1"
arguments: "-resourceGroup vaccs-mya-dev-uks -region uks"

- stage: DecommissionSourceDB
displayName: "Take Source DB Offline"
dependsOn: StopWebApp
jobs:
- job: TakeOffline
steps:
- checkout: self
- task: AzureCLI@2
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/take-offline-source-db.ps1"
arguments: >
-sourceAccount "vaccs-mya-cdb-dev-uks"
-resourceGroup "vaccs-mya-dev-uks"

- stage: CosmosPITR
displayName: "Perform Cosmos DB PITR"
dependsOn:
- StopWebApp
- Validation
- DecommissionSourceDB
variables:
RestoreTimeUtc: $[ stageDependencies.Validation.ValidateInput.outputs['ValidateStep.ConvertedUtcTime'] ]
jobs:
- job: RestoreCosmos
steps:
- task: AzureCLI@2
displayName: "Execute Restore"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "inlineScript"
inlineScript: |
az cosmosdb restore `
--account-name "vaccs-mya-cdb-dev-uks" `
--resource-group "vaccs-mya-dev-uks" `
--target-database-account-name "vaccs-mya-cdb-dev-uks-secondary" `
--location "uksouth" `
--restore-timestamp "$(RestoreTimeUtc)"

- stage: UpdateConfig
displayName: "Update Key Vault Configuration"
dependsOn: CosmosPITR
jobs:
- job: Update
steps:
- task: AzureCLI@2
displayName: "Execute KV Update Script"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/update-active-db-config.ps1"
arguments: >
-vaultName "vaccs-mya-kv-dev-uks"
-resourceGroup "vaccs-mya-dev-uks"
-cosmosAccountName "vaccs-mya-cdb-dev-uks-secondary"

- stage: CreateAuditBlobStorageAccount
displayName: "Create new audit blob storage account"
dependsOn: UpdateConfig
jobs:
- job: Create
steps:
- task: AzureCLI@2
displayName: "Create secondary audit blob storage account"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/create-audit-blob-storage.ps1"
arguments: >
-resourceGroup "vaccs-mya-dev-uks"
-blobAccountName "vaccsmyastrgaudit2devuks"
-subscriptionId "85913fdb-7f11-4963-8519-70879ffd2910"

- stage: UpdateAuditContainerApp
displayName: "Update audit container app to point to new storage account"
dependsOn: CreateAuditBlobStorageAccount
jobs:
- job: Update
steps:
- task: AzureCLI@2
displayName: "Update audit container app to point to new storage account"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/update-audit-storage-account.ps1"
arguments: >
-resourceGroup "vaccs-mya-dev-uks"
-blobAccountName "vaccsmyastrgaudit2devuks"
-containerApp "vaccs-mya-auditor-dev-uks"

- stage: RestartServices
displayName: "Restart Apps to Pick Up New Config"
dependsOn: UpdateAuditContainerApp
# This 'environment' line triggers the manual approval check if configured in ADO
jobs:
- deployment: Restart
# NOTE: For this to work, you MUST set up an Approval check on that environment in the Azure DevOps UI.
# Go to Pipelines -> Environments -> 'mya-dev-recovery' -> Approvals and Checks.
environment: "mya-dev-recovery"
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: AzureCLI@2
displayName: "Run Restart Services Script"
inputs:
azureSubscription: "vaccs-mya-dev-uks"
scriptType: "pscore"
scriptLocation: "scriptPath"
# Ensure this path matches your repo structure
scriptPath: "$(Build.SourcesDirectory)/scripts/disaster-recovery/restart-services.ps1"
arguments: "-resourceGroup vaccs-mya-dev-uks -region uks"
5 changes: 3 additions & 2 deletions data/BookingsDataExtracts/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.FeatureManagement;
using Nhs.Appointments.Core.Logger;
using Nhs.Appointments.Persistance.Models;
using Nhs.Appointments.Core.Configuration;

var builder = Host.CreateApplicationBuilder(args);
var azureAppConfigConnection = Environment.GetEnvironmentVariable("APP_CONFIG_CONNECTION");
Expand All @@ -12,8 +13,8 @@
builder.Configuration
.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("appsettings.json", false, true)
.AddEnvironmentVariables()
.AddNbsAzureKeyVault();
.AddNbsAzureKeyVault()
.AddMyaConfiguration();

// Handle Feature Flag (Local vs Cloud)
if (azureAppConfigConnection == "local")
Expand Down
5 changes: 3 additions & 2 deletions data/CapacityDataExtract/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using DataExtract;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Nhs.Appointments.Core.Configuration;
using Nhs.Appointments.Core.Logger;
using Nhs.Appointments.Persistance.Models;

Expand All @@ -11,8 +12,8 @@
builder.Configuration
.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.AddNbsAzureKeyVault();
.AddNbsAzureKeyVault()
.AddMyaConfiguration();

builder.UseAppointmentsSerilog();

Expand Down
18 changes: 18 additions & 0 deletions infrastructure/resources/containerapp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ resource "azurerm_container_app_job" "nbs_mya_booking_extracts_job" {
name = "COSMOS_TOKEN"
secret_name = "container-cosmos-password"
}
env {
name = "KEY_VAULT_URI"
value = azurerm_key_vault.nbs_mya_key_vault.vault_uri
}
env {
name = "FileSenderOptions__Type"
value = var.data_extract_file_sender_options_type
Expand Down Expand Up @@ -259,6 +263,10 @@ resource "azurerm_container_app_job" "nbs_mya_capacity_extracts_job" {
name = "COSMOS_TOKEN"
secret_name = "container-cosmos-password"
}
env {
name = "KEY_VAULT_URI"
value = azurerm_key_vault.nbs_mya_key_vault.vault_uri
}
env {
name = "FileSenderOptions__Type"
value = var.data_extract_file_sender_options_type
Expand Down Expand Up @@ -385,6 +393,11 @@ resource "azurerm_container_app" "nbs_mya_auditor" {
value = var.cosmos_endpoint != "" ? var.cosmos_endpoint : azurerm_cosmosdb_account.nbs_mya_cosmos_db[0].endpoint
}

env {
name = "KEY_VAULT_URI"
value = azurerm_key_vault.nbs_mya_key_vault.vault_uri
}

env {
name = "SPLUNK_HOST_URL"
value = var.splunk_host_url
Expand Down Expand Up @@ -532,6 +545,11 @@ resource "azurerm_container_app" "nbs_mya_aggregator" {
secret_name = "splunk-hec-token"
}

env {
name = "KEY_VAULT_URI"
value = azurerm_key_vault.nbs_mya_key_vault.vault_uri
}

env {
name = "COSMOS_ENDPOINT"
value = var.cosmos_endpoint != "" ? var.cosmos_endpoint : azurerm_cosmosdb_account.nbs_mya_cosmos_db[0].endpoint
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/resources/high_load_functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ resource "azurerm_windows_function_app" "nbs_mya_high_load_func_app" {
Auth__Providers__1__RequiresStateForAuthorize = true
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "High Load Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
"AzureWebJobs.NotifyBookingReminder.Disabled" = true
Expand Down Expand Up @@ -238,6 +239,7 @@ resource "azurerm_windows_function_app_slot" "nbs_mya_high_load_func_app_preview
Auth__Providers__1__RequiresStateForAuthorize = true
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "High Load Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
"AzureWebJobs.NotifyBookingReminder.Disabled" = true
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/resources/http_functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ resource "azurerm_windows_function_app" "nbs_mya_http_func_app" {
SITE_SUPPORTS_SERVICE_BATCH_MULTIPLIER = var.site_supports_service_batch_multiplier
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "HTTP Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.QueryAvailabilityFunction.Disabled" = var.disable_query_availability_function
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
Expand Down Expand Up @@ -189,6 +190,7 @@ resource "azurerm_windows_function_app_slot" "nbs_mya_http_func_app_preview" {
SITE_SUPPORTS_SERVICE_BATCH_MULTIPLIER = var.site_supports_service_batch_multiplier
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "HTTP Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.QueryAvailabilityFunction.Disabled" = var.disable_query_availability_function
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
Expand Down
62 changes: 62 additions & 0 deletions infrastructure/resources/keyvault.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
data "azurerm_client_config" "current" {}

# Create the Key Vault
resource "azurerm_key_vault" "nbs_mya_key_vault" {
name = "${var.application}-kv-${var.environment}-${var.loc}"
location = var.location
resource_group_name = local.resource_group_name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "standard"

enable_rbac_authorization = true
purge_protection_enabled = true
}

resource "azurerm_key_vault_secret" "active_cosmos_account" {
name = "ActiveCosmosDBAccountName"
value = "${var.application}-cdb-${var.environment}-${var.loc}"
key_vault_id = azurerm_key_vault.nbs_mya_key_vault.id

depends_on = [
azurerm_role_assignment.pipeline_secret_access
]

lifecycle {
ignore_changes = [value]
}
}

resource "azurerm_role_assignment" "pipeline_secret_access" {
scope = azurerm_key_vault.nbs_mya_key_vault.id
role_definition_name = "Key Vault Secrets Officer"
principal_id = data.azurerm_client_config.current.object_id
}


locals {
principals_map = merge(
{ for i, v in azurerm_container_app_job.nbs_mya_booking_extracts_job : "booking_extracts_job_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_container_app_job.nbs_mya_capacity_extracts_job : "capacity_extracts_job_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_container_app.nbs_mya_auditor : "auditor_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_container_app.nbs_mya_aggregator : "aggregator_${i}" => v.identity[0].principal_id },

{ for i, v in azurerm_windows_function_app.nbs_mya_high_load_func_app : "high_load_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_windows_function_app_slot.nbs_mya_high_load_func_app_preview : "high_load_preview_${i}" => v.identity[0].principal_id },

{ for i, v in azurerm_windows_function_app.nbs_mya_http_func_app : "http_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_windows_function_app_slot.nbs_mya_http_func_app_preview : "http_preview_${i}" => v.identity[0].principal_id },

{ for i, v in azurerm_windows_function_app.nbs_mya_service_bus_func_app : "sb_func_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_windows_function_app_slot.nbs_mya_service_bus_func_app_preview : "sb_preview_${i}" => v.identity[0].principal_id },

{ for i, v in azurerm_windows_function_app.nbs_mya_timer_func_app : "timer_${i}" => v.identity[0].principal_id },
{ for i, v in azurerm_windows_function_app_slot.nbs_mya_timer_func_app_preview : "timer_preview_${i}" => v.identity[0].principal_id }
)
}

resource "azurerm_role_assignment" "vault_access" {
for_each = local.principals_map
scope = azurerm_key_vault.nbs_mya_key_vault.id
role_definition_name = "Key Vault Secrets User"
principal_id = each.value
}
2 changes: 2 additions & 0 deletions infrastructure/resources/servicebus_functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "azurerm_windows_function_app" "nbs_mya_service_bus_func_app" {
DISABLE_SITE_CACHE = var.disable_site_cache
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "Service Bus Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.ApplyAvailabilityTemplateFunction.Disabled" = true
"AzureWebJobs.AuthenticateCallbackFunction.Disabled" = true
"AzureWebJobs.AuthenticateFunction.Disabled" = true
Expand Down Expand Up @@ -192,6 +193,7 @@ resource "azurerm_windows_function_app_slot" "nbs_mya_service_bus_func_app_previ
SITE_SUMMARY_MINIMUM_PARALLELIZATION = var.site_summary_minimum_parallelization
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "Service Bus Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.ApplyAvailabilityTemplateFunction.Disabled" = true
"AzureWebJobs.AuthenticateCallbackFunction.Disabled" = true
"AzureWebJobs.AuthenticateFunction.Disabled" = true
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/resources/timer_functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ resource "azurerm_windows_function_app" "nbs_mya_timer_func_app" {
AutoCancelledBookingsCronSchedule = var.auto_cancelled_bookings_cron_schedule
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "Timer Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
"AzureWebJobs.NotifyBookingReminder.Disabled" = true
Expand Down Expand Up @@ -201,6 +202,7 @@ resource "azurerm_windows_function_app_slot" "nbs_mya_timer_func_app_preview" {
AutoCancelledBookingsCronSchedule = var.auto_cancelled_bookings_cron_schedule
CANCEL_A_DATE_RANGE_MAXIMUM_DAYS = var.cancel_a_date_range_maximum_days
APPLICATION_NAME = "Timer Function App"
KEY_VAULT_URI = azurerm_key_vault.nbs_mya_key_vault.vault_uri
"AzureWebJobs.NotifyBookingCancelled.Disabled" = true
"AzureWebJobs.NotifyBookingMade.Disabled" = true
"AzureWebJobs.NotifyBookingReminder.Disabled" = true
Expand Down
12 changes: 12 additions & 0 deletions scripts/disaster-recovery/create-audit-blob-storage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
param (
[string][Parameter(Mandatory)]$resourceGroup,
[string][Parameter(Mandatory)]$blobAccountName,
[string][Parameter(Mandatory)]$subscriptionId
)


az storage account create --name $blobAccountName --resource-group $resourceGroup --subscription $subscriptionId --location uksouth --sku Standard_LRS --min-tls-version TLS1_2

if ($LASTEXITCODE -ne 0) {
throw "Failed to create new storage account '$blobAccountName' in '$resourceGroup'"
}
Loading
Loading