Azure / Azure/azure-quickstart-templates

How do i det output of a automation job?

Open
#3,200 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

I start an automation job as part of nested deployment and I'm looking for a way of getting the output of the job. I'm trying to do the following

` "outputs": {
"vmName": {
"value": "[reference('subscriptions/{guid}/resourceGroups/VMGroup/providers/Microsoft.Automation/automationAccounts/firstTestAcct/jobs/deaa4f2a-7869-4161-b47b-06cfb2782391/streams','2015-10-31')]",
"type": "object"
}`

but it fails with the following
` "error": {
"code": "InvalidResourceNamespace",
"message": "The resource namespace 'subscriptions' is invalid."
}`

but when I do
` "outputs": {
"vmName": {
"value": "[reference('subscriptions/{guid}/resourceGroups/VMGroup/providers/Microsoft.Automation/automationAccounts/firstTestAcct/jobs/deaa4f2a-7869-4161-b47b-06cfb2782391,'2015-10-31')]",
"type": "object"
}`

it returns some object.

on the other hand when I reference a full stream uri, it returns what I need

` "outputs": {
"vmName": {
"value": "[reference('/subscriptions/{guid}/resourceGroups/VMGroup/providers/Microsoft.Automation/automationAccounts/firstTestAcct/jobs/deaa4f2a-7869-4161-b47b-06cfb2782391/streams/deaa4f2a-7869-4161-b47b-06cfb2782391_00636250215808263202_00000000000000000002','2015-10-31')]",
"type": "object"
}`

So the question is how to get the output of an automation job and return it back to a master deployment

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is named. Start by tracing the ARM template expressions in the issue and checking how Azure Automation job and stream resources are referenced in nested deployments. Done means identifying a supported way to retrieve the job output and return it to the master deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.