6

How do I know which parameters to provide and which parameters are overridden in Azure Resources ?

I am getting these errors and losing lots of time figuring out which parameters I need

Should I just start with the parameters in the parameters file and paste the defaultvalues in templates? ( If so why don't they already do this?)

Is there a way to read the actual parameters of the running system. As when I used the Automation Script part in azure the values are null

enter image description here

"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { "virtualMachineScaleSets_Services_name": { "value": null },

The Error comes when I paste the parameters from the old config

14:01:16 - InvalidTemplate: Deployment template validation failed: 'The template parameters 'loadBalancers_LB_xwxservices_MainNode_name, loadBalancers_LB_xwxservices_MainNode_id, loadBalancers_LB_xwxservices_MainNode_id_1, clusters_xwxservices_name, loadBalancers_LB_xwxservices_MainNode_id_5, loadBalancers_LB_xwxservices_MainNode_id_6, loadBalancers_LB_xwxservices_MainNode_id_7, virtualMachineScaleSets_MainNode_name, loadBalancers_LB_xwxservices_MainNode_id_2, loadBalancers_LB_xwxservices_MainNode_id_3, loadBalancers_LB_xwxservices_MainNode_id_4' in the parameters file are not valid;

New-AzureRmResourceGroupDeployment : 12:27:25 PM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template parameters 'nt1applicationStartPort, nt2applicationEndPort, nt0ephemeralEndPort, clusterName, nt2ephemeralEndPort, nt2InstanceCount, nt0applicationStartPort, nt1fabricHttpGatewayPort, virtualNetworkName, certificateThumbprint, nt0fabricHttpGatewayPort, nt1InstanceCount, adminUserName, applicationDiagnosticsStorageAccountName, nt1ephemeralEndPort, vmNodeType0Size, nt1applicationEndPort, dnsTAName, lbTAIPName, nt0fabricTcpGatewayPort, lbName, dnsName, adminPassword, nicName, nt2fabricTcpGatewayPort, nt1fabricTcpGatewayPort, secondaryCertificateUrlValue, vmNodeType2Size, clusterLocation, nt1ephemeralStartPort, supportLogStorageAccountName, nt2applicationStartPort, sourceVaultValue, nt0ephemeralStartPort, vmStorageAccountName, nt0applicationEndPort, publicIPAddressName, computeLocation, nt2fabricHttpGatewayPort, nt2ephemeralStartPort, vmNodeType1Size, secondaryCertificateThumbprint, certificateUrlValue, nt0InstanceCount, lbIPName' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'virtualMachineScaleSets_Services_name, virtualMachineScaleSets_Stateful_name,

PHPirate
  • 7,023
  • 7
  • 48
  • 84
Rıfat Erdem Sahin
  • 1,738
  • 4
  • 29
  • 47

1 Answers1

4

you need to relax.

Autogenerated arm templates aren't meant to be production ready, they need refinement. that is expected. Azure cannot infer any single parameter value instead of you. Usually most of the parameters are populated, but sometimes - not. Nothing you can do about it, fill them out manually.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • I got like more than 300 parameters. They change all the time. Wrote a console app that does that. (: – Rıfat Erdem Sahin Jun 24 '17 at 11:52
  • you should probably refine the entire template, 300 parameters is beyond nuts – 4c74356b41 Jun 24 '17 at 16:42
  • It is a big deployment schema. They had used lots of resources in Azure. So many configurations. That was the reason I wrote the app. I also want parameters to be in sync with code base. If I can write an addon for slack. I would also like to inform the devops team for infrachanges. – Rıfat Erdem Sahin Jun 24 '17 at 16:44
  • When we delete the parameters we are able to use the default values. Still you are right we need to make sure the default values still do not conflict with existing resources. – Rıfat Erdem Sahin Jul 03 '17 at 10:27
  • Thanks for the answer. I am staying calm (: . started this question to figure out a way to solve the problem in smaller steps. https://stackoverflow.com/questions/44884446/how-can-i-divide-an-existing-template-into-linked-templates – Rıfat Erdem Sahin Jul 03 '17 at 11:31
  • Arm templating is still terrible, 2 years later. – SSH This May 21 '19 at 20:40
  • shrug ;) its a lot better now :) – 4c74356b41 May 21 '19 at 20:41