[Quick Hint] Input parameters in vRealize Orchestrator 8 payload

Input paraments are available in vRO8 payload only in very early stages of deployment. For example you can easily get them in Deployment requested stage as a vRO8 payload in inputProperties variable

Payload for Deploy requested Stage

But what if you want to have access to your inputs data later in deployment process? You can of course make a REST call to vRA, get the deployment data and in deployment JSON you will find all the inputs. But REST calls also cost some time, and if you do a lot of them, this will add up to your VM deployment time.

Deployment JSON data

There is a very easy way around this problem. You can set up Costume Properties on your Cloud Template (blueprint) with a value for all your inputs this way you will be able to access all inputs values instantly on most of the stages with inputProperties variable like this:

Bluprint:

inputs:
  size:
    type: string
    enum:
      - x-small
      - small
      - medium
      - large
      - x-large
    default: small
    title: VM Size
  hostname:
    type: string
    title: Hostname
    pattern: '^[a-z]{3,5}$'
  location:
    type: string
    enum:
      - loc:claster1
      - loc:claster2
    title: Location
  stage:
    type: string
    enum:
      - 'stage:dev'
      - 'stage:int'
      - 'stage:prod'
    title: Stage
resources:
  VM:
    type: Cloud.vSphere.Machine
    properties:
      Size: '${input.size}'
	  Hostname: '${input.hostname}'
      Location: '${input.location}'
      Stage: '${input.stage}'
      image: rhel8
      flavor: '${input.size}'
      constraints:
        - tag: '${input.location}'
        - tag: '${input.stage}'
      networks: []

vRO input variable access:

var size = inputProperties.customProperties.Size;
var hostname = inputProperties.customProperties.Hostname;
var location = inputProperties.customProperties.Location;
var stage =  inputProperties.customProperties.Stage;

Remember to set up an input variable inputProperties of type Properties in your workflow like this: