self.resourceName can not be used in constraint tags for a resource in Aria Automation 8.x
search cancel

self.resourceName can not be used in constraint tags for a resource in Aria Automation 8.x

book

Article ID: 373114

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Trying to provision to a particular storage or cloud zone based on the resource's own name does not use the eventual name of the resource:

storage:
constraints:
- tag: ${contains(self.resourceName,"-zA") == true ? "zone:A" :"zone:B"}

This is also true of tags applied to the resource, e.g.:

tags:
- '${self.resourceName}'

No tag will be applied.

Environment

VMware Aria Automation 8.x (formerly vRealize Automation, vRA)

Cause

This is too early in the provisioning process for the resource name to be available, as it is assigned after allocation is complete.

This can be seen in the History of the deployment: the ALLOCATE stage comes before the resource name is given in the CREATE stage of deployment.

Resolution

Please use another variable in the constraint tag, such as an input variable.

For further ideas and information about deploying resources, please see the More Automation Assembler template examples section of the docs.

For direct help with design and implementation, please engage our Professional Services organization.