From 85e4d0f9170349697bf06ef05ccfc567fafb8df1 Mon Sep 17 00:00:00 2001 From: Pallavi Reddy <84752343+pallar-ms@users.noreply.github.com> Date: Wed, 9 Jun 2021 16:57:22 -0700 Subject: [PATCH] cleanup delete scripts (#111) --- .../Delete-IomtFhirSandboxAuthConfig.ps1 | 65 -- .../Delete-IomtFhirSandboxEnvironment.ps1 | 11 - deploy/templates/flexible-azuredeploy.json | 881 ------------------ 3 files changed, 957 deletions(-) delete mode 100644 deploy/scripts/Delete-IomtFhirSandboxAuthConfig.ps1 delete mode 100644 deploy/templates/flexible-azuredeploy.json diff --git a/deploy/scripts/Delete-IomtFhirSandboxAuthConfig.ps1 b/deploy/scripts/Delete-IomtFhirSandboxAuthConfig.ps1 deleted file mode 100644 index aa08b5d3..00000000 --- a/deploy/scripts/Delete-IomtFhirSandboxAuthConfig.ps1 +++ /dev/null @@ -1,65 +0,0 @@ -<# -.SYNOPSIS -Deletes application registrations and user profiles from an AAD tenant -.DESCRIPTION -#> -param -( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$EnvironmentName, - - [Parameter(Mandatory = $false)] - [string]$EnvironmentLocation = "North Central US", - - [Parameter(Mandatory = $false)] - [string]$ResourceGroupName = $EnvironmentName, - - [parameter(Mandatory = $false)] - [string]$KeyVaultName = "$EnvironmentName-ts" -) - -Set-StrictMode -Version Latest - -# Get current AzureAd context -try { - $tenantInfo = Get-AzureADCurrentSessionInfo -ErrorAction Stop -} -catch { - throw "Please log in to Azure AD with Connect-AzureAD cmdlet before proceeding" -} - -# Ensure that we have the FhirServer PS Module loaded -if (Get-Module -Name FhirServer) { - Write-Host "FhirServer PS module is loaded" -} else { - Write-Host "Cloning FHIR Server repo to get access to FhirServer PS module." - if (!(Test-Path -Path ".\fhir-server")) { - git clone --quiet https://github.com/Microsoft/fhir-server | Out-Null - } - Import-Module .\fhir-server\samples\scripts\PowerShell\FhirServer\FhirServer.psd1 -} - -$PaasUrl = "https://${EnvironmentName}.azurehealthcareapis.com" - -$application = Get-AzureAdApplication -Filter "identifierUris/any(uri:uri eq '$PaasUrl')" - -if ($application) { - Remove-FhirServerApplicationRegistration -AppId $application.AppId -} - -$UserNamePrefix = "${EnvironmentName}-" -$userId = "${UserNamePrefix}admin" -$domain = $tenantInfo.TenantDomain -$userUpn = "${userId}@${domain}" - -$aadUser = Get-AzureADUser -Filter "userPrincipalName eq '$userUpn'" -if ($aadUser) { - Remove-AzureADUser -ObjectId $aadUser.ObjectId -} - -$serviceClientAppName = "${EnvironmentName}-service-client" -$serviceClient = Get-AzureAdApplication -Filter "DisplayName eq '$serviceClientAppName'" -if ($serviceClient) { - Remove-FhirServerApplicationRegistration -AppId $serviceClient.AppId -} \ No newline at end of file diff --git a/deploy/scripts/Delete-IomtFhirSandboxEnvironment.ps1 b/deploy/scripts/Delete-IomtFhirSandboxEnvironment.ps1 index bb37e904..f27ce01c 100644 --- a/deploy/scripts/Delete-IomtFhirSandboxEnvironment.ps1 +++ b/deploy/scripts/Delete-IomtFhirSandboxEnvironment.ps1 @@ -12,14 +12,6 @@ param Set-StrictMode -Version Latest -# Get current AzureAd context -try { - $tenantInfo = Get-AzureADCurrentSessionInfo -ErrorAction Stop -} -catch { - throw "Please log in to Azure AD with Connect-AzureAD cmdlet before proceeding" -} - # Get current Az context try { $azContext = Get-AzContext @@ -28,8 +20,5 @@ catch { throw "Please log in to Azure RM with Login-AzAccount cmdlet before proceeding" } -# Set up Auth Configuration and Resource Group -./Delete-IomtFhirSandboxAuthConfig.ps1 -EnvironmentName $EnvironmentName - # Wipe out the environment Get-AzResourceGroup -Name $EnvironmentName | Remove-AzResourceGroup -Verbose -Force diff --git a/deploy/templates/flexible-azuredeploy.json b/deploy/templates/flexible-azuredeploy.json deleted file mode 100644 index d390079a..00000000 --- a/deploy/templates/flexible-azuredeploy.json +++ /dev/null @@ -1,881 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "ServiceName": { - "type": "string", - "minLength": 3, - "maxLength": 20, - "metadata": { - "description": "Name for the service(s) being deployed. Name will applied to all relevant services being created." - } - }, - "RepositoryUrl": { - "type": "string", - "defaultValue": "https://github.com/Microsoft/iomt-fhir", - "metadata": { - "description": "Repository to pull source code from. If blank, source code will not be deployed." - } - }, - "RepositoryBranch": { - "type": "string", - "defaultValue": "master", - "metadata": { - "description": "Source code branch to deploy." - } - }, - "JobWindowUnit": { - "type": "string", - "allowedValues": [ - "SECOND", - "MINUTE", - "HOUR" - ], - "metadata": { - "description": "The time period to collect events before sending them to the FHIR server." - }, - "defaultValue": "MINUTE" - }, - "JobWindowMagnitude": { - "type": "int", - "minValue": 1, - "maxValue": 60, - "metadata": { - "description": "The magnitude of time period to collect events before sending them to the FHIR server." - }, - "defaultValue": 5 - }, - "StreamingUnits": { - "type": "int", - "minValue": 1, - "maxValue": 120, - "metadata": { - "description": "Number of Streaming Units for the ASA job processing device events." - }, - "allowedValues": [ - 1, - 3, - 6, - 12, - 18, - 24, - 30, - 36, - 42, - 48, - 54, - 60, - 66, - 72, - 78, - 84, - 90, - 96, - 102, - 108, - 114, - 120 - ], - "defaultValue": 1 - }, - "ThroughputUnits": { - "type": "int", - "minValue": 1, - "maxValue": 20, - "metadata": { - "description": "The throughput units reserved for the Event Hubs created." - }, - "defaultValue": 1 - }, - "AppServicePlanSku": { - "type": "string", - "allowedValues": [ - "F1", - "D1", - "B1", - "B2", - "B3", - "S1", - "S2", - "S3", - "P1", - "P2", - "P3", - "P4" - ], - "defaultValue": "S1", - "metadata": { - "description": "The app service plan tier to use for hosting the required Azure Functions." - } - }, - "ResourceLocation": { - "type": "string", - "allowedValues": [ - "Australia East", - "East US", - "East US 2", - "West US", - "West US 2", - "North Central US", - "South Central US", - "Southeast Asia", - "North Europe", - "West Europe", - "UK West", - "UK South" - ], - "metadata": { - "description": "The location of the deployed resources." - } - }, - "FhirVersion": { - "type": "string", - "allowedValues": [ - "R4" - ], - "defaultValue": "R4", - "metadata": { - "description": "The FHIR version used in the connector. It should match the version used in the FHIR service." - } - }, - "FhirServiceUrl": { - "type": "string", - "metadata": { - "description": "Url of the FHIR server that IoMT will be written to." - } - }, - "FhirServiceAuthority": { - "type": "string", - "metadata": { - "description": "Authority of the FHIR to retrieve a token against." - } - }, - "FhirServiceResource": { - "type": "string", - "metadata": { - "description": "Resource/Audience representing the FHIR server on the provided authority." - } - }, - "FhirServiceClientId": { - "type": "string", - "metadata": { - "description": "Client Id to run services as for access to the FHIR server." - } - }, - "FhirServiceClientSecret": { - "type": "securestring", - "metadata": { - "description": "Client secret of the application for accessing a token." - } - }, - "ResourceIdentityResolutionType": { - "type": "string", - "allowedValues": [ - "Lookup", - "Create", - "LookupWithEncounter" - ], - "defaultValue": "Lookup", - "metadata": { - "description": "Configures how patient, device, and other FHIR resource identities are resolved from the ingested data stream." - } - }, - "DefaultDeviceIdentifierSystem": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Default system to use when searching for device identities. If empty system is not used in the search." - } - } - }, - "variables": { - "asa_job_name": "[parameters('ServiceName')]", - "eventhub_namespace_name": "[parameters('ServiceName')]", - "normalizeddata_eventhub_name": "[concat(variables('eventhub_namespace_name'), '/normalizeddata')]", - "devicedata_eventhub_name": "[concat(variables('eventhub_namespace_name'), '/devicedata')]", - "storage_account_name": "[parameters('ServiceName')]", - "app_plan_name": "[concat(parameters('ServiceName'), 'plan')]", - "app_service_name": "[parameters('ServiceName')]", - "app_insights_name": "[parameters('ServiceName')]", - "key_vault_name": "[parameters('ServiceName')]", - "app_service_resource_id": "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]", - "deploy_source_code": "[and(not(empty(parameters('repositoryUrl'))),not(empty(parameters('repositoryBranch'))))]", - "sender_role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')]", - "receiver_role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')]", - "iomt_fhir_connector_name": "[concat('ResourceIdentity', ':', parameters('ResourceIdentityResolutionType'))]" - }, - "resources": [ - { - "type": "Microsoft.StreamAnalytics/StreamingJobs", - "apiVersion": "2019-06-01", - "name": "[variables('asa_job_name')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'normalizeddata', 'reader')]", - "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]", - "[resourceId('Microsoft.Web/sites/config', variables('app_service_name'), 'web')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/consumergroups', variables('eventhub_namespace_name'), 'devicedata', '$Default')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/consumergroups', variables('eventhub_namespace_name'), 'normalizeddata', '$Default')]" - ], - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "identity": { - "type": "SystemAssigned" - }, - "properties": { - "outputStartMode": "JobStartTime", - "sku": { - "name": "standard" - }, - "jobType": "Cloud", - "eventsOutOfOrderPolicy": "Adjust", - "outputErrorPolicy": "Stop", - "eventsOutOfOrderMaxDelayInSeconds": 0, - "eventsLateArrivalMaxDelayInSeconds": 5, - "dataLocale": "en-US", - "compatibilityLevel": "1.0", - "inputs": [ - { - "name": "normalizeddata", - "properties": { - "type": "Stream", - "datasource": { - "type": "Microsoft.ServiceBus/EventHub", - "properties": { - "serviceBusNamespace": "[variables('eventhub_namespace_name')]", - "eventHubName": "normalizeddata", - "consumerGroupName": null, - "sharedAccessPolicyName": "reader", - "sharedAccessPolicyKey": "[listkeys(resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'normalizeddata', 'reader'), '2017-04-01').primaryKey]" - } - }, - "compression": { - "type": "None" - }, - "serialization": { - "type": "Json", - "properties": { - "encoding": "UTF8" - } - } - } - } - ], - "outputs": [ - { - "name": "FhirImportOutput", - "properties": { - "datasource": { - "type": "Microsoft.AzureFunction", - "properties": { - "functionAppName": "[variables('app_service_name')]", - "functionName": "MeasurementCollectionToFhir", - "apiKey": "[listkeys(concat(resourceId('Microsoft.Web/sites', variables('app_service_name')), '/host/default'), '2018-11-01').masterKey]", - "maxBatchSize": null, - "maxBatchCount": 100 - } - } - } - } - ], - "transformation": { - "name": "Transformation", - "properties": { - "streamingUnits": "[parameters('StreamingUnits')]", - "query": "[concat('SELECT \r\n DeviceId [DeviceId], \r\n PatientId [PatientId],\r\n EncounterId [EncounterId],\r\n CorrelationId [CorrelationId],\r\n collect() [Data],\r\n System.Timestamp [WindowTime],\r\n Type [MeasureType],\r\n count(*) [Count]\r\nINTO\r\n [FhirImportOutput]\r\nFROM\r\n [NormalizedData] PARTITION BY PartitionId TIMESTAMP BY OccurrenceTimeUtc\r\nGROUP BY PartitionId, \r\n DeviceId, \r\n PatientId, \r\n EncounterId, \r\n CorrelationId, \r\n Type, \r\n TUMBLINGWINDOW(', parameters('JobWindowUnit'), ', ', parameters('JobWindowMagnitude'), ')')]" - } - }, - "functions": [ - ] - } - }, - { - "type": "Microsoft.EventHub/namespaces", - "apiVersion": "2017-04-01", - "name": "[variables('eventhub_namespace_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": "[parameters('ThroughputUnits')]" - }, - "properties": { - "zoneRedundant": true, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": false - } - }, - { - "type": "Microsoft.EventHub/namespaces/AuthorizationRules", - "apiVersion": "2017-04-01", - "name": "[concat(variables('eventhub_namespace_name'), '/RootManageSharedAccessKey')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]" - ], - "properties": { - "rights": [ - "Listen", - "Manage", - "Send" - ] - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs", - "apiVersion": "2017-04-01", - "name": "[variables('devicedata_eventhub_name')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]" - ], - "properties": { - "messageRetentionInDays": 1, - "partitionCount": 32, - "status": "Active" - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs", - "apiVersion": "2017-04-01", - "name": "[variables('normalizeddata_eventhub_name')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]" - ], - "properties": { - "messageRetentionInDays": 1, - "partitionCount": 32, - "status": "Active" - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules", - "apiVersion": "2017-04-01", - "name": "[concat(variables('eventhub_namespace_name'), '/devicedata/writer')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]", - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', variables('eventhub_namespace_name'), 'RootManageSharedAccessKey')]" - ], - "properties": { - "rights": [ - "Send" - ] - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules", - "apiVersion": "2017-04-01", - "name": "[concat(variables('eventhub_namespace_name'), '/normalizeddata/reader')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]", - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/AuthorizationRules', variables('eventhub_namespace_name'), 'RootManageSharedAccessKey')]" - ], - "properties": { - "rights": [ - "Listen" - ] - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups", - "apiVersion": "2017-04-01", - "name": "[concat(variables('eventhub_namespace_name'), '/devicedata/$Default')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]", - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'devicedata', 'writer')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'normalizeddata', 'reader')]" - ], - "properties": { - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups", - "apiVersion": "2017-04-01", - "name": "[concat(variables('eventhub_namespace_name'), '/normalizeddata/$Default')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]", - "[resourceId('Microsoft.EventHub/namespaces', variables('eventhub_namespace_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'devicedata', 'writer')]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', variables('eventhub_namespace_name'), 'normalizeddata', 'reader')]" - ], - "properties": { - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/providers/roleAssignments", - "apiVersion": "2018-07-01", - "name": "[concat(variables('devicedata_eventhub_name'), '/Microsoft.Authorization/', guid(uniqueString(variables('devicedata_eventhub_name'))))]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]" - ], - "properties": { - "roleDefinitionId": "[variables('receiver_role')]", - "principalId": "[reference(variables('app_service_resource_id'), '2015-08-01', 'Full').Identity.principalId]", - "scope": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'devicedata')]", - "principalType": "ServicePrincipal" - } - }, - { - "type": "Microsoft.EventHub/namespaces/eventhubs/providers/roleAssignments", - "apiVersion": "2018-07-01", - "name": "[concat(variables('normalizeddata_eventhub_name'), '/Microsoft.Authorization/', guid(uniqueString(variables('normalizeddata_eventhub_name'))))]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]", - "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]" - ], - "properties": { - "roleDefinitionId": "[variables('sender_role')]", - "principalId": "[reference(variables('app_service_resource_id'), '2015-08-01', 'Full').Identity.principalId]", - "scope": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', variables('eventhub_namespace_name'), 'normalizeddata')]", - "principalType": "ServicePrincipal" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2019-04-01", - "name": "[variables('storage_account_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [ - ], - "ipRules": [ - ], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "enabled": true - }, - "blob": { - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "2019-04-01", - "name": "[concat(variables('storage_account_name'), '/default')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account_name'))]" - ], - "properties": { - "cors": { - "corsRules": [ - ] - }, - "deleteRetentionPolicy": { - "enabled": false - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-04-01", - "name": "[concat(variables('storage_account_name'), '/default/template')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('storage_account_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2016-09-01", - "name": "[variables('app_plan_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "sku": { - "name": "[parameters('AppServicePlanSku')]" - }, - "kind": "app", - "properties": { - "name": "[variables('app_plan_name')]", - "perSiteScaling": false, - "reserved": false, - "targetWorkerCount": 0, - "targetWorkerSizeId": 0 - } - }, - { - "type": "Microsoft.Web/sites", - "apiVersion": "2016-08-01", - "name": "[variables('app_service_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('app_plan_name'))]", - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('storage_account_name'), 'default')]" - ], - "kind": "functionapp", - "identity": { - "type": "SystemAssigned" - }, - "properties": { - "enabled": true, - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('app_plan_name'))]", - "reserved": false, - "scmSiteAlsoStopped": false, - "clientAffinityEnabled": false, - "clientCertEnabled": false, - "hostNamesDisabled": false, - "containerSize": 1536, - "dailyMemoryTimeQuota": 0, - "httpsOnly": true - }, - "resources": [ - { - "apiVersion": "2015-08-01", - "name": "appsettings", - "type": "config", - "dependsOn": [ - "[variables('app_service_resource_id')]", - "[resourceId('Microsoft.Insights/components/', variables('app_insights_name'))]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-url')]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-authority')]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-resource')]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-clientid')]", - "[resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-clientsecret')]" - ], - "properties": { - "InputEventHub": "[concat('Endpoint=sb://', variables('app_service_name'), '.servicebus.windows.net/;Authentication=ManagedIdentity;EntityPath=devicedata')]", - "OutputEventHub": "[concat('Endpoint=sb://', variables('app_service_name'), '.servicebus.windows.net/;Authentication=ManagedIdentity;EntityPath=normalizeddata')]", - "FUNCTIONS_EXTENSION_VERSION": "~3", - "FUNCTIONS_EXTENSION_RUNTIME": "dotnet", - "PROJECT": "src/func/Microsoft.Health.Fhir.Ingest.Host/Microsoft.Health.Fhir.Ingest.Host.csproj", - "AzureWebJobsStorage": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'blob-storage-cs'), '2018-02-14').secretUriWithVersion, ')')]", - "AzureWebJobsSecretStorageType": "Files", - "FhirVersion": "[parameters('FhirVersion')]", - "FhirService:Url": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-url'), '2018-02-14').secretUriWithVersion, ')')]", - "FhirService:Authority": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-authority'), '2018-02-14').secretUriWithVersion, ')')]", - "FhirService:Resource": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-resource'), '2018-02-14').secretUriWithVersion, ')')]", - "FhirService:ClientId": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-clientid'), '2018-02-14').secretUriWithVersion, ')')]", - "FhirService:ClientSecret": "[concat('@Microsoft.KeyVault(SecretUri=', reference(resourceId('Microsoft.KeyVault/vaults/secrets', variables('key_vault_name'),'fhirserver-clientsecret'), '2018-02-14').secretUriWithVersion, ')')]", - "APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(concat('Microsoft.Insights/components/', variables('app_insights_name'))).InstrumentationKey]", - "Template:DeviceContent": "devicecontent.json", - "Template:FhirMapping": "fhirmapping.json", - "ResourceIdentity:ResourceIdentityServiceType": "[parameters('ResourceIdentityResolutionType')]", - "ResourceIdentity:DefaultDeviceIdentifierSystem": "[parameters('DefaultDeviceIdentifierSystem')]" - } - }, - { - "apiVersion": "2015-08-01", - "name": "web", - "type": "sourcecontrols", - "condition": "[variables('deploy_source_code')]", - "dependsOn": [ - "[variables('app_service_resource_id')]", - "[resourceId('Microsoft.Web/sites/config', variables('app_service_name'), 'appsettings')]" - ], - "properties": { - "RepoUrl": "[parameters('RepositoryURL')]", - "branch": "[parameters('RepositoryBranch')]", - "IsManualIntegration": true - } - } - ] - }, - { - "type": "Microsoft.Web/sites/config", - "apiVersion": "2016-08-01", - "name": "[concat(variables('app_service_name'), '/web')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]" - ], - "properties": { - "numberOfWorkers": 1, - "defaultDocuments": [ - ], - "netFrameworkVersion": "v4.0", - "phpVersion": "5.6", - "pythonVersion": "", - "nodeVersion": "", - "linuxFxVersion": "", - "requestTracingEnabled": false, - "remoteDebuggingEnabled": false, - "remoteDebuggingVersion": "VS2017", - "httpLoggingEnabled": false, - "logsDirectorySizeLimit": 35, - "detailedErrorLoggingEnabled": false, - "scmType": "None", - "use32BitWorkerProcess": true, - "webSocketsEnabled": false, - "alwaysOn": true, - "appCommandLine": "", - "managedPipelineMode": "Integrated", - "virtualApplications": [ - { - "virtualPath": "/", - "physicalPath": "site\\wwwroot", - "preloadEnabled": true, - "virtualDirectories": null - } - ], - "winAuthAdminState": 0, - "winAuthTenantState": 0, - "customAppPoolIdentityAdminState": false, - "customAppPoolIdentityTenantState": false, - "loadBalancing": "LeastRequests", - "routingRules": [ - ], - "experiments": { - "rampUpRules": [ - ] - }, - "autoHealEnabled": false, - "vnetName": "", - "siteAuthEnabled": false, - "siteAuthSettings": { - "enabled": null, - "unauthenticatedClientAction": null, - "tokenStoreEnabled": null, - "allowedExternalRedirectUrls": null, - "defaultProvider": null, - "clientId": null, - "clientSecret": null, - "clientSecretCertificateThumbprint": null, - "issuer": null, - "allowedAudiences": null, - "additionalLoginParams": null, - "isAadAutoProvisioned": false, - "googleClientId": null, - "googleClientSecret": null, - "googleOAuthScopes": null, - "facebookAppId": null, - "facebookAppSecret": null, - "facebookOAuthScopes": null, - "twitterConsumerKey": null, - "twitterConsumerSecret": null, - "microsoftAccountClientId": null, - "microsoftAccountClientSecret": null, - "microsoftAccountOAuthScopes": null - }, - "cors": { - "allowedOrigins": [ - "https://functions.azure.com", - "https://functions-staging.azure.com", - "https://functions-next.azure.com" - ], - "supportCredentials": false - }, - "localMySqlEnabled": false, - "http20Enabled": false, - "minTlsVersion": "1.2", - "ftpsState": "FtpsOnly", - "reservedInstanceCount": 0 - } - }, - { - "type": "Microsoft.Web/sites/hostNameBindings", - "apiVersion": "2016-08-01", - "name": "[concat(variables('app_service_name'), '/', variables('app_service_name'), '.azurewebsites.net')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('app_service_name'))]" - ], - "properties": { - "siteName": "variables('app_service_name')", - "hostNameType": "Verified" - } - }, - { - "type": "microsoft.insights/components", - "apiVersion": "2015-05-01", - "name": "[variables('app_insights_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "kind": "web", - "properties": { - "Application_Type": "web", - "Flow_Type": "Redfield", - "Request_Source": "IbizaAIExtension" - } - }, - { - "type": "Microsoft.KeyVault/vaults", - "apiVersion": "2016-10-01", - "name": "[variables('key_vault_name')]", - "location": "[parameters('ResourceLocation')]", - "tags": { - "IomtFhirConnector": "[variables('iomt_fhir_connector_name')]", - "IomtFhirVersion": "[parameters('FhirVersion')]" - }, - "dependsOn": [ - "[variables('app_service_resource_id')]" - ], - "properties": { - "sku": { - "family": "A", - "name": "Standard" - }, - "tenantId": "[subscription().tenantId]", - "accessPolicies": [ - { - "tenantId": "[reference(variables('app_service_resource_id'), '2015-08-01', 'Full').Identity.tenantId]", - "objectId": "[reference(variables('app_service_resource_id'), '2015-08-01', 'Full').Identity.principalId]", - "permissions": { - "keys": [ - ], - "secrets": [ - "Get", - "List" - ], - "certificates": [ - ] - } - } - ], - "enabledForDeployment": false, - "enabledForDiskEncryption": false, - "enabledForTemplateDeployment": false - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/blob-storage-cs')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]", - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('storage_account_name'), 'default')]" - ], - "properties": { - "contentType": "text/plain", - "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_account_name'), ';AccountKey=', listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('storage_account_name')), '2019-04-01').keys[0].value)]", - "attributes": { - "enabled": true - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/fhirserver-authority')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]" - ], - "properties": { - "contentType": "text/plain", - "value": "[parameters('FhirServiceAuthority')]", - "attributes": { - "enabled": true - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/fhirserver-clientid')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]" - ], - "properties": { - "contentType": "text/plain", - "value": "[parameters('FhirServiceClientId')]", - "attributes": { - "enabled": true - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/fhirserver-clientsecret')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]" - ], - "properties": { - "contentType": "text/plain", - "value": "[parameters('FhirServiceClientSecret')]", - "attributes": { - "enabled": true - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/fhirserver-resource')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]" - ], - "properties": { - "contentType": "text/plain", - "value": "[parameters('FhirServiceResource')]", - "attributes": { - "enabled": true - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/secrets", - "apiVersion": "2016-10-01", - "name": "[concat(variables('key_vault_name'), '/fhirserver-url')]", - "location": "[parameters('ResourceLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.KeyVault/vaults', variables('key_vault_name'))]" - ], - "properties": { - "contentType": "text/plain", - "value": "[parameters('FhirServiceUrl')]", - "attributes": { - "enabled": true - } - } - } - ], - "outputs": { - } -} \ No newline at end of file