diff --git a/src/scripts/importer.bash b/src/scripts/importer.bash index 066e3bc..6e68151 100644 --- a/src/scripts/importer.bash +++ b/src/scripts/importer.bash @@ -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" @@ -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