Someone in my company set up a resource group called Customers
in our Azure portal. I have a successful build pipeline and now I want to create a release pipeline.
If I create a App Service in the Azure Portal and link it to the Customers resource group I can successfully release my React application. But I want to automate this process.
I've created a ARM template:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2016-09-01",
"name": "movieseatcustomers",
"location": "[resourceGroup().location]",
"sku": {
"name": "F1",
"capacity": 1
},
"tags": {
"displayName": "movieseatcustomers"
},
"properties": {
"name": "movieseatcustomers"
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2018-02-01",
"name": "movieseatcustomers1234",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/movieseatcustomers')]": "Resource",
"displayName": "movieseatcustomers1234"
},
"dependsOn": [
"Microsoft.Web/serverfarms/movieseatcustomers"
],
"properties": {
"name": "movieseatcustomers1234",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', 'movieseatcustomers')]"
}
}
],
"outputs": {}
}
But in my release pipeline I get the error:
2019-05-31T11:27:11.0415849Z ##[error]BadRequest: {
"Code": "BadRequest",
"Message": "Requested feature is not available in resource group Customers. Please try using a different resource group or create a new one.",
What's the deal? Am I implementing the creating of a app service wrongly? Do I need special rights to do it through a ARM template?