The PowerShell script can be used to provision the Azure resources required to deploy this Digital Documentation for Shipping Industry Solution Accelerator. You may skip this section if you prefer to provision your resources via the Azure Portal, using the Azure Resource Manager(ARM) Template provided, or one of the Deploy to Azure buttons on the main documentation page.
The PowerShell script will provision the following resources to your Azure subscription:
- Azure Cosmos DB API for MongoDB account
- Azure Function App
- Azure App Service Plan
- Azure Storage Account
- Azure Managed Identity
- Azure Subscription - Required to deploy compute resources
- PowerShell 7.1 - Required to run deployment scripts
- Azure CLI installed - Required to run deployment scripts
- User Access Administrator Role - Assigned to Azure Subscription user
Execute the following steps to deploy Azure resources:
Clone or download this repository, if you have not already done so.
Check here for more information on cloning a repository.
-
Run PowerShell 7.1
-
Run Change Directory command to Navigate to the Path using the resourcedeployment.ps1 location deployments/ARMTemplates/Bicep/
PS C:\Users\>cd <directory path>
Remember to write down all of the output values printed on the screen. These will be required in the next step (when deploying Azure Function code).
-
Run the resourcedeployment.ps1 with the following parameters:
.\resourcedeployment.ps1 <SubscriptionId> <location>
SubscriptionId: The subscription ID for where you want to manage your resources location: Azure Data Center Region where resources will be deployed
After the completion of the script, check to see that all of the Azure resources deployed successfully. Your resource groups should look similar to the image below.
- Reminder: The managed identity name will differ by deployment. Your managed identity name will be different. Ex. DShipUserIdentity-XXXXX
-
Step into the Azure Function app
-
Under the settings click on the identity
-
Click on the User Assigned tab and click on add and select DShipUserIdentity-XXXXX
-
Refresh to confirm identity assignment
-
Step into the Azure Cosmos DB account
-
Click on the Access control and click on add and select Add role assignment
-
Search for the "DocumentDB Account Contributor" in the search box given. Select the "DocumentDB Account Contributor" role and click Next
-
Select "Managed Identity," and click on the "Selected members," and select the identity you configured the steps above
-
Click on "Review + assign" to add the role assignment
-
Refresh to confirm role assignment
You've successfully deployed all the resources!
For the next step, go to Application Deployment.