ARM Template failing due to not finding member 'credential' (Microsoft.Automation automationAccounts/hybridRunbookWorkerGroups)

Sean Casey 26 Reputation points
2022-06-29T16:45:57.89+00:00

I am attempting to deploy an ARM Template that creates a new Azure Automation Account with the following resources: runbook, credentials, and hybridRunbookWorkerGroups. The runbook and credentials deploy successfully, but I continue to get the following validation error when including the hybridRunbookWorkerGroups resource:

The request content was invalid and could not be deserialized: 'Could not find member 'credential' on object of type 'TemplateResource'. Path 'properties.template.resources[0].resources[2].credential', line 136, position 27.'. (Code: InvalidRequestContent)

I am following the template format found in Microsoft Learn: https://learn.microsoft.com/en-us/azure/templates/microsoft.automation/2021-06-22/automationaccounts/hybridrunbookworkergroups?tabs=json&source=docs

As noted in the template, credential is an expected property. credential is also returned when calling the REST API found here: https://learn.microsoft.com/en-us/rest/api/automation/hybrid-runbook-worker-group/list-by-automation-account?tryIt=true&source=docs#code-try-0

Here is the code snippet from my ARM template for creation of the hybridRunbookWorkerGroups resource (both parameters are set to a value):

{
"type": "hybridRunbookWorkerGroups",
"apiVersion": "2021-06-22",
"name": "[parameters('hybridWorkerGroup')]",
"credential": {
"name": "[parameters('credentialsName')]"
}
}

If I deploy the ARM Template without the credential property, the Hybrid Worker Group is created however the deployment still fails with the following error: "code":"ResourceDeploymentFailure","message":"The response for resource had empty or invalid content."}]}

Is there a problem with my code or is there an issue with the API? Any further guidance would be greatly appreciated. Thanks!

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,072 questions
{count} vote

Accepted answer
  1. SwathiDhanwada-MSFT 16,646 Reputation points
    2022-07-07T08:57:16.723+00:00

    @Sean Casey Welcome to Microsoft Q & A Community Forum. It is known issue, in case of hybrid worker group, the response return was not inline with ARM response format recommendation, so ARM is treating it as failures, but the actual call is succeeding. Please don’t use the ARM template for creating Hybrid worker group, you can use API or UX for creating hybrid worker group. Product team is currently working on the fix. As of now, the ETA is set to end of this month (7/31).

    0 comments No comments

0 additional answers

Sort by: Most helpful