This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schemas.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"externalUrl": { | |
"type": "string", | |
"metadata": { | |
"description": "External url of the service used to access the service and for auth redirections." | |
} | |
}, | |
"AADAuthClientId": { | |
"type": "string", | |
"metadata": { | |
"description": "Client Id provided by Azure AD for this application authentication." | |
} | |
}, | |
"openIdIssuer": { | |
"type": "string", | |
"metadata": { | |
"description": "Open ID issuer url." | |
} | |
}, | |
"apiAppName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the API app to create. The name must contain at least 8 characters and no more than 50 characters." | |
} | |
}, | |
"hostingPlanName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the name App Service plan." | |
} | |
}, | |
"hostingPlanSettings": { | |
"type": "Object", | |
"defaultValue": { | |
"computeMode": "Dedicated", | |
"siteMode": "Limited", | |
"sku": "Free", | |
"workerSize": "0", | |
"hostingEnvironment": "" | |
}, | |
"metadata": { | |
"description": "The settings of the existing hosting plan." | |
} | |
}, | |
"apiLocation": { | |
"type": "string", | |
"metadata": { | |
"description": "The location for the new API app." | |
} | |
} | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Web/serverfarms", | |
"apiVersion": "2015-04-01", | |
"name": "[parameters('hostingPlanName')]", | |
"location": "[parameters('apiLocation')]", | |
"properties": { | |
"name": "[parameters('hostingPlanName')]", | |
"sku": "[parameters('hostingPlanSettings').sku]", | |
"workerSize": "[parameters('hostingPlanSettings').workerSize]", | |
"hostingEnvironment": "[parameters('hostingPlanSettings').hostingEnvironment]", | |
"numberOfWorkers": 1 | |
} | |
}, | |
{ | |
"type": "Microsoft.Web/sites", | |
"apiVersion": "2015-08-01", | |
"name": "[parameters('apiAppName')]", | |
"location": "[parameters('apiLocation')]", | |
"kind": "api", | |
"properties": { | |
"name": "[parameters('apiAppName')]", | |
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]", | |
"hostingEnvironment": "[parameters('hostingPlanSettings').hostingEnvironment]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2015-08-01", | |
"location": "North Europe", | |
"name": "[concat(parameters('apiAppName'), '/authsettings')]", | |
"properties": { | |
"enabled": true, | |
"httpApiPrefixPath": null, | |
"unauthenticatedClientAction": 0, | |
"tokenStoreEnabled": true, | |
"allowedExternalRedirectUrls": [ | |
"[parameters('externalUrl')]" | |
], | |
"defaultProvider": 1, | |
"clientId": "[parameters('AADAuthClientId')]", | |
"clientSecret": null, | |
"issuer": "[parameters('openIdIssuer')]", | |
"allowedAudiences": [ | |
"[parameters('externalUrl')]" | |
], | |
"isAadAutoProvisioned": true, | |
"aadClientId": "[parameters('AADAuthClientId')]", | |
"openIdIssuer": "[parameters('openIdIssuer')]" | |
}, | |
"tags": null, | |
"type": "Microsoft.Web/sites/config", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('apiAppName'))]" | |
] | |
} | |
], | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment