0

I'm trying to deploy a Resource Group that includes an Azure Automation Account. One of the parameters in the parameters.json file is called automationAccounts_DSCAutomationAccount_sku. Putting an arbitrary string as its value results in an InvalidTemplate error:

The provided value for the template parameter 'automationAccounts_DSCAutomationAccount_sku' at line '7' and 7' is not valid.'.

Specific Question: What would constitute a valid value? In powershell there is no sku property of the AutomationAccount object. And when creating a new account in the Portal, there is never an option to select one of many different kinds of Automation Accounts, there is only one kind. So what does Azure need an SKU field for anyway?

General Question: In Azure Templates (and parameter files) how can I know what a certain field expects, and what fields are required for a certain resource? Is there any centralized doc that has all of these requirements?
It seems that there isn't, and if that's the case, that makes authoring templates nearly impossible, with the only viable option for producing templates being configuring a resource group in the Azure Portal, and then downloading the template JSON file that it generates.

AllTradesJack
  • 2,762
  • 5
  • 25
  • 36

1 Answers1

2

Indeed you raise a valid point, I have not seen a centralized place to look that up, but, there's a ARM schema which is the closest to what you ask that you can get, in my opinion. But that place is a pain to navigate\look through.

Also, there's the https://resources.azure.com resource, which is really helpful, and there's the Automation script option on the portal, that would effectively export out the json template for you. Having said that, here's the free SKU example:

"sku": {
  "name": "Free",
  "family": null,
  "capacity": null
},

also, this seems to be the relevant schema for Automation

https://raw.githubusercontent.com/Azure/azure-resource-manager-schemas/master/schemas/2015-10-31/Microsoft.Automation.json

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • Much thanks again, this solved the error. Which resource did you use to find these fields and values for SKU? The Automation part of the Schema? I see now how I could read the schema to find these fields. But how would I know what "name", "family", and "capacity" are referring too, and thus what values (of the available options) to assign to them? I can't think of any corresponding values in the Portal. – AllTradesJack Jan 10 '17 at 18:23
  • 2
    I'm mostly using `https://resources.azure.com` because it is much easier to look up value for existing resource, then to browse the schema, which is next to unreadable. – 4c74356b41 Jan 10 '17 at 18:26
  • 1
    This [Resource Explorer](https://resources.azure.com) is a great tool. I'm surprised that I haven't even heard of it till now with all of my reading of Azure articles on MSDN and the like. – AllTradesJack Jan 10 '17 at 22:29