Skip to content

Commit

Permalink
changes to app settings (catch up with .net core move)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellikopter committed Dec 18, 2018
1 parent 23254fa commit 609e381
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 49 deletions.
56 changes: 9 additions & 47 deletions Deployment/AppService.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@
"applicationPlanName": {
"type": "string",
"metadata": {
"description": "Name of the Application Insights."
}
},
"operationsResourceGroupName": {
"type": "string",
"metadata": {
"description": "Name of the Resource Group where backup storage is."
}
},
"applicationInsightsName": {
"type": "string",
"metadata": {
"description": "Name of the Application Insights."
"description": "Name of the Application plan."
}
},
"photoStorageAccountEndpoint": {
Expand All @@ -38,12 +26,6 @@
"description": "Connection string for cache Azure Storage (should be r/w SAS)."
}
},
"photoNotFoundImageId": {
"type": "string",
"metadata": {
"description": "Id of the default image."
}
},
"apiManagementIP": {
"type": "string",
"metadata": {
Expand Down Expand Up @@ -131,35 +113,15 @@
],
"properties": {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"ApplicationInsightsInstrumentationKey": "[reference(resourceId(subscription().subscriptionId,parameters('operationsResourceGroupName'),'Microsoft.Insights/Components',parameters('applicationInsightsName')),'2014-04-01').InstrumentationKey]",
"NotFoundImageId": "[parameters('photoNotFoundImageId')]",
"SubscriptionKey": "",
"ApiVersion": ""
}
},
{
"comments": "Connection strings used by the App",
"apiVersion": "2015-08-01",
"name": "connectionstrings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('photoAPIName'))]"
],
"properties": {
"PhotoStorage": {
"value": "[parameters('photoStorageAccountEndpoint')]",
"type": "Custom"
},
"PhotoCache": {
"value": "[parameters('photoCacheAccountEndpoint')]",
"type": "Custom"
},
"FixedQuery": {
"value": "https://api.parliament.uk/query/",
"type": "Custom"
}
"Cache__ConnectionString": "[parameters('photoCacheAccountEndpoint')]",
"Cache__Container": "cache",
"Storage__ConnectionString": "[parameters('photoStorageAccountEndpoint')]",
"Storage__Container": "photo",
"Query__Endpoint": "https://api.parliament.uk/query/",
"Query__SubscriptionKey": "",
"Query__ApiVersion": ""
}
}
}
],
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('applicationPlanName'))]"
Expand Down
4 changes: 2 additions & 2 deletions Deployment/PhotoAPISettings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ foreach($set in $webAppSettings){
}

Log "Sets new settings"
$settings["SubscriptionKey"]=$subscription.PrimaryKey
$settings["ApiVersion"]=$APIPrefix
$settings["Query__SubscriptionKey"]=$subscription.PrimaryKey
$settings["Query__ApiVersion"]=$APIPrefix

Set-AzureRmWebApp -ResourceGroupName $APIResourceGroupName -Name $PhotoAPIName -AppSettings $settings

Expand Down

0 comments on commit 609e381

Please sign in to comment.