Reputation: 340
I created a .bacpac from the original SQL Azure DB I want to import to a new database during my deployment process. To do this, I want to have a github page with the usual Deploy to Azure button, that in as close to one click performs the deployment task, and sets up my entire application.
To do this, however, I need to set up some initial data on the database. After consulting the internet, I saw the post Using Azure Resource Manager to Copy Azure SQL Databases, which had a similar issue.
Right now, I have a MSDeploy extension running in the ARM template that deploys a website from a public azure blob. I'd ideally like to do this with the database too, but the command seems to require storageKeyType and storageKey parameters to be filled.
Is there any way to go around this limitation? Should I just give up and have my application perform the initial setup of the database? Sharing the storage key in a public github template does not seem like a very good plan!
Here's a code snippet:
"resources": [
{
"name": "Import",
"type": "extensions",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[variables('sqlsrvmymisName')]",
"[variables('sqldbmymisName')]"
],
"properties": {
"storageUri": "https://publicblob.blob.core.windows.net/artifacts/publicblob.bacpac",
"administratorLogin": "MasterAccount",
"administratorLoginPassword": "P@ssw0rd",
"operationMode": "Import",
"storageKeyType": "Primary",
"storageKey": ""
}
}
]
Upvotes: 0
Views: 492
Reputation: 8737
If you really want it to be public, try this:
"storageKeyType": "SharedAccessKey",
"storageKey": "?",
Upvotes: 4