The following example shows the updated template:
:::image type="content" source="media/template-tutorial-deploy-sql-extensions-bacpac/resource-manager-tutorial-deploy-sql-extensions-bacpac.png" alt-text="Screenshot of the template with SQL Database extension.":::
To understand the resource definition, see the API version's [SQL Database extension reference](/azure/templates/microsoft.sql/servers/databases/extensions). The following are some important elements:
- `dependsOn`: The extension resource must be created after the database has been created.
- `storageKeyType`: Specify the type of the storage key to use. The value can be either `StorageAccessKey` or `SharedAccessKey`. Use `StorageAccessKey` in this tutorial.
- `storageKey`: Specify the key for the storage account where the BACPAC file is stored. If the storage key type is `SharedAccessKey`, it must be preceded with a "?".
- `storageUri`: Specify the URL of the BACPAC file stored in a storage account.
- `administratorLogin`: The SQL administrator's account name.
- `administratorLoginPassword`: The SQL administrator's password. To use a generated password, see [Prerequisites](#prerequisites).
The following example shows the completed template:
[!code-json[](~/resourcemanager-templates/tutorial-sql-extension/azuredeploy2.json?range=1-106&highlight=38-49,62-76,86-103)]
## Deploy the template
Use the project name and location that were used when you prepared the BACPAC file. That puts all resources in the same resource group, which is helpful when you delete resources.
1. Sign in to [Cloud Shell](https://shell.azure.com).
1. Select **PowerShell** from the upper left corner.
:::image type="content" source="media/template-tutorial-deploy-sql-extensions-bacpac/cloud-shell-select.png" alt-text="Screenshot of Azure Cloud Shell in PowerShell with the option to upload a file.":::
1. Select **Upload/Download files** and upload your _azuredeploy.json_ file.
1. To deploy the template, copy and paste the following script into the shell window.