Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
Open
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/scripts/importer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ subscriptionid=xxx
tenantid=yourtenantid
fhirclientid=yourclientid
fhirclientsecret=yourclientsecret
importertemplate="src\\templates\\importer.json"
#importertemplate="src\\templates\\importer.json"

fhirserviceurl="https://$workspacename-$fhirservicename.fhir.azurehealthcareapis.com"
#importertemplate="src\\templates\\importer.json"
Expand All @@ -26,14 +26,14 @@ importertemplate=https://raw.githubusercontent.com/microsoft/healthcare-apis-sam
az group create --name $resourcegroupname --location $location

# deploy the importer as Azure Function
az deployment group create --name $deploymentname --resource-group $resourcegroupname --template-file $importertemplate --parameters appNameImporter=$importername fhirServiceUrl=$fhirserviceurl aadFHIRClientId=$fhirclientid aadFHIRClientSecret=$fhirclientsecret --rollback-on-error
az deployment group create --name $deploymentname --resource-group $resourcegroupname --template-uri $importertemplate --parameters appNameImporter=$importername fhirServiceUrl=$fhirserviceurl aadFHIRClientId=$fhirclientid aadFHIRClientSecret=$fhirclientsecret --rollback-on-error
#az functionapp delete --name $importername --resource-group $resourcegroupname

# grant the importer Azure Function with access to the storage
importerstoragename=$importername'sa'
storagerolescope="https://management.azure.com/subscriptions/$subscriptionid/resourceGroups/$resourcegroupname/providers/Microsoft.Storage/storageAccounts/$importerstoragename/blobServices/default"
#find FHIR service managed identity AAD object id
$fhiraadobjectid=(az ad sp show --id yourclientid --query objectId)
fhiraadobjectid=$(az ad sp show --id $fhirclientid --query objectId)
#fhiraadobjectid="xxx"
az role assignment create --assignee-object-id $fhiraadobjectid --role "Storage Blob Data Contributor" --scope $storagerolescope