I am trying to deploy an ARM template that will provision the following elements:
sql server
sql server
sql server db
storage account
app service plan
2 websites
I get the following error information:
RESOURCE ID: /subscriptions/xxxx/resourceGroups/servicename-int-rg/providers/Microsoft.Web/serverfarms/servicename-int-appservice
STATUSMESSAGE: {
"Code": "NotFound",
"Message": "Server farm with name servicename-int-appservice not found.",
"Target": null,
"Details": [
{
"Message": "Server farm with name servicename-int-appservice not found."
},
{
"Code": "NotFound"
},
{
"ErrorEntity": {
"Code": "NotFound",
"Message": "Server farm with name servicename-int-appservice not found.",
"ExtendedCode": "11001",
"MessageTemplate": "Server farm with name {0} not found.",
"Parameters": [
"servicename-int-appservice"
],
"InnerErrors": []
}
}
],
"Innererror": null
}
RESOURCE: servicename-int-appservice
You can see the slightly modified template Gist
I managed to get your template working. What I think is going on - you are supplying hostnames that are not acceptable by Azure, as it expects hostname like blablabla.azurewebsites.net
So what I've did (because I'm lazy) I've removed all the hostname parameters from the Microsoft.Web/serverfarms and Microsoft.Web/sites. It did deploy after that. You could probably figure out how to pass proper host names on your own, since you got this far. :)
here's whats working for me (I've removed all the pieces not relevant to the websites) http://pastebin.com/697bG27Z
Related
I'm facing an issue where I keep getting this error on our Azure Devops instance while running our yaml pipeline using the task AzureAppServiceSettings#1 to setup the connection strings for our DB server.
- task: AzureAppServiceSettings#1
displayName: 'Dev app service settings'
inputs:
azureSubscription: '**subscriptionName**'
appName: '**appName**'
resourceGroupName: '**resourceGroupName**'
connectionStrings: |
[
{
"name": "DefaultConneciton",
"value": "Server=tcp:**serverName**,1433;Initial Catalog=**dbName**;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication=\"Active Directory Default\";",
"type": "SQLAzure",
"slotSetting": false
}
]
After running the task it throws this error:
##[error]Error: Failed to update App service 'appName' Connection Strings. Error: BadRequest - The parameter properties has an invalid
value. (CODE: 400)
I've also tried editing the app settings through Azure Resource Explorer
And had the same output:
{
"Code": "BadRequest",
"Message": "The parameter properties has an invalid value.",
"Target": null,
"Details": [
{
"Message": "The parameter properties has an invalid value."
},
{
"Code": "BadRequest"
},
{
"ErrorEntity": {
"ExtendedCode": "51008",
"MessageTemplate": "The parameter {0} has an invalid value.",
"Parameters": [
"properties"
],
"Code": "BadRequest",
"Message": "The parameter properties has an invalid value."
}
}
],
"Innererror": null
}
I'm being able to edit the connection string only trough the portal.
if you have added the connection Strings parameter on the azure portal, try to remove it on the pipeline or on the azure portal.
if it doesn't work, replace the ** with the ''.
I was trying to create an AKS cluster and it failed with the following message in the portal
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "ReconcileStandardLoadBalancerError",
"message": "Reconcile standard load balancer failed. Details: standardLoadBalancerReconciler retry failed: Code=\"SubscriptionNotRegistered\" Message=\"Subscription xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is not registered with NRP.\" Details=[]."
}
]
}
}
you have to go into All services -> Subscriptions -> Resource providers
And get this registered.
Microsoft.Kubernetes Registered
I'm new to DevOps. Any help on this error is highly appreciated.
When I try to create and deploy DevOps project on Azure I'm receiving the following error.
I'm following steps in this link.
https://learn.microsoft.com/en-us/azure/devops-project/azure-devops-project-aks
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.",
"details": [
{
"code": "Conflict",
"message": {
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.",
"details": [
{
"code": "BadRequest",
"message": {
"code": "InvalidRequestValue",
"message": "Failed to create the project 'xxxxxxx'. More details: 'Configuration failed at step: 'Configuring release pipeline'. More details: Failed to acquire authorization token. Details: [AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.Trace ID: 5cebc087-cb41-4b95-bc72-3c55cf250400 Correlation ID: 2a51cf8c-c8b1-420d-84a2-e50ca8193044 Timestamp: 2018-08-01 09:07:39Z]. ResponseCode: Unauthorized.'.",
"target": "ProcessCompletedJob"
}
}
]
}
]
}
}
}
]
}
As the error message says, AADSTS50012 indicates that an invalid client secret was provided. Check if your current key is expired in the Azure Portal and try generating a new one.
When making a call to the Microsoft German Graph /sites/root endpoint, it returns 'Resource Not Found', although that in global Graph the same endpoint works perfectly ok
Here is an example:
https://graph.microsoft.de/v1.0/sites/root
It returns:
{
"error": {
"code": "BadRequest",
"message": "Resource not found for the segment 'sites'.",
"innerError": {
"request-id": "aff4a613-54ed-476d-976f-d4ac7a8c7ee2",
"date": "2018-04-26T07:59:17"
}
}
}
Found an answer, for now, this service is deployed only in the "beta" API
So I used https://graph.microsoft.de/beta/sites/root and it works
I want to automatically deploy a Consumption Plan based Function App in my DEV/TEST/PROD instances. For that I started creating a Function App manually in the Portal, copy/pasted the automation script and incorporated it into my ARM template project.
To have my source code automatically deployed to the Function App I integrated the link to the repo/branch in the template:
"resources": [
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('name'))]"
],
"tags": {
"displayName": "fnSourceControl"
},
"properties": {
"repoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('repoBranch')]",
"isManualIntegration": false
}
}
]
That just works fine when deploying from VS or from command line. Resource Group is created with the Function App and code is deployed into it: Magic! However when deploying from a VSTS release definition, the deployment fails with:
Resource Microsoft.Web/sites/sourcecontrols 'myFunctionApp/web' failed with message '{
"Code": "BadRequest",
"Message": "Parameter x-ms-client-principal-name is null or empty.",
"Target": null,
"Details": [
{
"Message": "Parameter x-ms-client-principal-name is null or empty."
},
{
"Code": "BadRequest"
},
{
"ErrorEntity": {
"Code": "BadRequest",
"Message": "Parameter x-ms-client-principal-name is null or empty.",
"ExtendedCode": "51011",
"MessageTemplate": "Parameter {0} is null or empty.",
"Parameters": [
"x-ms-client-principal-name"
],
"InnerErrors": null
}
}
],
"Innererror": null
}
This question is related to my other question regarding the 'Microsoft.Storage/storageAccounts/providers/locks' deployment problem. I guess it goes into the same direction. I did not want to overload one question mixing both problems.
I talked to our expert, and the response is that VSTS setup with a Service Principal is not supported. The reason is, for VSTS, we impersonate the caller and call the VSTS api on user's behalf. For this to work, the caller needs to be a valid VSTS account. Put when using a Service Principal you have an identity which is not a valid VSTS account.
Note that it has nothing to do with the fact that you're deploying from a VSTS release definition. So same would happen when deploying locally using a Service Principal identity.