Skip to content

Instantly share code, notes, and snippets.

@jordanyaker
Created September 19, 2016 16:57
Show Gist options
  • Save jordanyaker/f20ffca378a63926b5446615a8a5f23c to your computer and use it in GitHub Desktop.
Save jordanyaker/f20ffca378a63926b5446615a8a5f23c to your computer and use it in GitHub Desktop.
Azure REST API Errors
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"newStorageAccountName": {
"type": "string",
"metadata": {
"description": "Name of the of the storage account for VM OS Disk"
}
},
"publicDomainName": {
"type": "string",
"metadata": {
"description": "Domain name associated with the load balancer public IP"
}
},
"dnsPrefixNameForPublicIP": {
"type": "string",
"metadata": {
"description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_A3",
"allowedValues": [
"Standard_A0",
"Standard_A1",
"Standard_A2",
"Standard_A3",
"Standard_A5",
"Standard_A4",
"Standard_A6",
"Standard_A7",
"Basic_A0",
"Basic_A1",
"Basic_A2",
"Basic_A3",
"Basic_A4",
"Standard_D1_v2",
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_D11_v2",
"Standard_D12_v2",
"Standard_D13_v2",
"Standard_D14_v2",
"Standard_D15_v2",
"Standard_F1",
"Standard_F2",
"Standard_F4",
"Standard_F8",
"Standard_F16",
"Standard_D1",
"Standard_D2",
"Standard_D3",
"Standard_D4",
"Standard_D11",
"Standard_D12",
"Standard_D13",
"Standard_D14",
"Standard_DS1_v2",
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_DS11_v2",
"Standard_DS12_v2",
"Standard_DS13_v2",
"Standard_DS14_v2",
"Standard_DS15_v2",
"Standard_F1s",
"Standard_F2s",
"Standard_F4s",
"Standard_F8s",
"Standard_F16s",
"Standard_A8",
"Standard_A9",
"Standard_A10",
"Standard_A11"
],
"metadata": {
"description": "Instance size for the VMs"
}
},
"adminUserName": {
"type": "string",
"metadata": {
"description": "Username to login to the VMs"
}
},
"sshKeyData": {
"type": "string",
"metadata": {
"description": "Public key for SSH authentication"
}
},
"customData": {
"type": "string",
"metadata": {
"description": "Base64-encoded cloud-config.yaml file to deploy and start fleet"
}
},
"numberOfNodes": {
"type": "int",
"metadata": {
"description": "Number of member nodes"
},
"defaultValue": 3
},
"dockerVolumeSize": {
"type": "int",
"metadata": {
"description": "Size in GB of the Docker volume"
},
"defaultValue": 100
},
"coreosVersion": {
"type": "string",
"metadata": {
"description": "Version of CoreOS to deploy"
}
},
"storageAccountType": {
"type": "string",
"metadata": {
"description": "Storage account type"
},
"allowedValues": [
"Standard_LRS",
"Premium_LRS"
],
"defaultValue": "Premium_LRS"
}
},
"variables": {
"addressPrefix": "10.0.0.0/16",
"subnet1Name": "Subnet-1",
"subnet1Prefix": "10.0.0.0/24",
"publicIPAddressType": "Dynamic",
"imagePublisher": "CoreOS",
"imageOffer": "CoreOS",
"imageSKU": "Stable",
"vmNamePrefix": "deisNode",
"virtualNetworkName": "deisvNet",
"availabilitySetName": "deisAvailabilitySet",
"loadBalancerName": "loadBalancer",
"loadBalancerAPIRuleName": "loadBalancerAPIRule",
"loadBalancerBuilderRuleName": "loadBalancerBuildRule",
"loadBalancerPublicIPName": "loadBalancerIP",
"loadBalancerIPConfigName": "loadBalancerIPConfig",
"lbBackendAddressPoolName": "lbBackendAddressPool",
"apiProbeName": "apiProbe",
"builderProbeName": "builderProbe",
"sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
"subnet1Ref": "[concat(variables('vnetID'),'/subnets/',variables('subnet1Name'))]",
"lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]",
"lbAPIRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerAPIRuleName'))]",
"lbBuilderRuleID": "[concat(variables('lbID'),'/loadBalancingRules/',variables('loadBalancerBuilderRuleName'))]",
"lbIPConfig": "[concat(variables('lbID'),'/frontendIPConfigurations/',variables('loadBalancerIPConfigName'))]",
"apiProbeID": "[concat(variables('lbID'),'/probes/',variables('apiProbeName'))]",
"builderProbeID": "[concat(variables('lbID'),'/probes/',variables('builderProbeName'))]",
"lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbBackendAddressPoolName'))]"
},
"resources": [
{
"type": "Microsoft.Compute/availabilitySets",
"name": "[variables('availabilitySetName')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"properties": {}
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('newStorageAccountName')]",
"location": "[resourceGroup().location]",
"apiVersion": "2015-05-01-preview",
"properties": {
"accountType": "[parameters('storageAccountType')]"
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('loadBalancerPublicIPName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[parameters('publicDomainName')]"
}
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "PublicIPAddress"
},
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[concat(parameters('dnsPrefixNameForPublicIP'),copyIndex())]"
}
},
"copy": {
"name": "publicIpCopy",
"count": "[parameters('numberOfNodes')]"
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/loadBalancers",
"name": "[variables('loadBalancerName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('loadBalancerPublicIPName'))]"
],
"properties": {
"frontendIPConfigurations": [
{
"name": "[variables('loadBalancerIPConfigName')]",
"properties": {
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('loadBalancerPublicIPName'))]"
}
}
}
],
"backendAddressPools": [
{
"name": "[variables('lbBackendAddressPoolName')]",
"properties": {
"loadBalancingRules": [
{
"id": "[variables('lbAPIRuleID')]"
},
{
"id": "[variables('lbBuilderRuleID')]"
}
]
}
}
],
"loadBalancingRules": [
{
"name": "[variables('loadBalancerAPIRuleName')]",
"dependsOn": [
"[variables('lbIPConfig')]"
],
"properties": {
"frontendIPConfiguration": {
"id": "[variables('lbIPConfig')]"
},
"backendAddressPool": {
"id": "[variables('lbPoolID')]"
},
"protocol": "TCP",
"frontendPort": 80,
"backendPort": 80,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 10,
"probe": {
"id": "[variables('apiProbeID')]"
}
}
},
{
"name": "[variables('loadBalancerBuilderRuleName')]",
"dependsOn": [
"[variables('lbIPConfig')]"
],
"properties": {
"frontendIPConfiguration": {
"id": "[variables('lbIPConfig')]"
},
"backendAddressPool": {
"id": "[variables('lbPoolID')]"
},
"protocol": "TCP",
"frontendPort": 2222,
"backendPort": 2222,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 10
}
}
],
"probes": [
{
"name": "[variables('apiProbeName')]",
"properties": {
"protocol": "HTTP",
"port": 80,
"intervalInSeconds": 5,
"numberOfProbes": 2,
"requestPath": "/health-check"
}
}
]
}
},
{
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('virtualNetworkName')]",
"location": "[resourceGroup().location]",
"apiVersion": "2015-05-01-preview",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('addressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('subnet1Name')]",
"properties": {
"addressPrefix": "[variables('subnet1Prefix')]"
}
}
]
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"name": "[concat('nic', copyindex())]",
"copy": {
"name": "nicLoop",
"count": "[parameters('numberOfNodes')]"
},
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]",
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
"[variables('lbID')]"
],
"apiVersion": "2015-05-01-preview",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('dnsPrefixNameForPublicIP'),copyIndex()))]"
},
"subnet": {
"id": "[variables('subnet1Ref')]"
},
"loadBalancerBackendAddressPools": [
{
"id": "[variables('lbPoolID')]"
}
]
}
}
]
}
}
]
}
> azure group create --name deis --location "North Central US" --deployment-name deis --template-file arm-template.json --parameters-file parameters.json
info: Executing command group create
+ Getting resource group deis
+ Updating resource group deis
info: Updated resource group deis
+ Initializing template configurations and parameters
+ Creating a deployment
error: InvalidTemplateDeployment : The template deployment 'deis' is not valid according to the validation procedure. The tracking id is '626404e7-cf0f-427a-96e8-235597e9a361'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage details.
error: RulesUseSameBackendPortProtocolAndPool : Load balancing rules /subscriptions/48e41a52-a2e8-479b-8ce1-0822f13be7e2/resourceGroups/deis/providers/Microsoft.Network/loadBalancers/loadBalancer/loadBalancingRules/loadBalancerAPIRule and /subscriptions/48e41a52-a2e8-479b-8ce1-0822f13be7e2/resourceGroups/deis/providers/Microsoft.Network/loadBalancers/loadBalancer/loadBalancingRules/loadBalancerBuildRule with floating IP disabled use the same protocol Tcp and backend port 0, and must not be used with the same backend address pool /subscriptions/48e41a52-a2e8-479b-8ce1-0822f13be7e2/resourceGroups/deis/providers/Microsoft.Network/loadBalancers/loadBalancer/backendAddressPools/lbBackendAddressPool.
error: Deployment validate failed.
error: Error information has been recorded to /Users/jordan/.azure/azure.err
error: group create command failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment