Search code examples
azureazure-resource-managerazure-automationazure-bicep

Bicep add parameters to Automation Account Job Schedule


Bumping up against Bicep documentation as usual. I can't seem to find any help on how to add parameters to a Job Schedule for an Automation Account Runbook.

Example from MS is

  name: 'string'
  parent: resourceSymbolicName
  properties: {
    parameters: {}
    runbook: {
      name: 'string'
    }
    runOn: 'string'
    schedule: {
      name: 'string'
    }
  }
}

But when i try -

parameters:{
Param1: 'myval'
Param2: 'myval2'
}

It doesnt get added to the job schedule at all. It's also frustrating that they don't have a JSON view of the Job Schedule section so you can click-ops it and add parameters and then check the file to see the structure. Anyone come across this?


Solution

  • I gave it a try using api-version 2022-08-08 and I had to add extra double quotes for the parameter values:

    parameters:{
      Param1: '"myval"'
      Param2: '"myval2"'
    }