vRealize Automation 6 Custom Resource Properties

vRealize Automation 6 Custom Resource Properties

September 8, 2014 0 By Eric Shanks

In the last post, we showed how to use vCAC to surface a vCO workflow.  The problem presents itself when the vCO workflow is looking for something other than a string for a variable.  What if you are looking for an object?  For example there may be a user named “Clarice Starling” and that name could be a string.  But the Active Directory object for user Clarice Starling has many attributes such as account, description, permissions etc and that is not a string.  So if you want to perform an action on an object from vCAC, what do you do?

Notice that if I open a different vCO workflow that adds an AD user to an AD Group, the input types are not strings, but their own type.

CustomInputs1

 

Custom Resources

The answer is a custom resource.

If we go to the Advanced Services tab –> Custom Resources we can add a new “Custom Resource” that maps to an object.  Click the green “+” sign to add a new one.

CustomInputs2

 

In the Resource Type tab, we select a new resource type.  When I start typing AD… into the box, the list of available resource properties starts to populate and then I can select the property that I want.

CustomInputs3

 

Name the property and give it a description.

CustomInputs4

 

In the details form, we’ll be able to customize how the requester will interact with the resource property.  I’ve left the defaults.

CustomInputs5

 

Create a new Service Blueprint like we did in our last post.

I grabbed the vCO workflow “Add a user to a user group”.

CustomInputs6

 

You can see we now have two service blueprints, but of course I need to publish this blueprint.

CustomInputs7

 

Again, customize the item to your liking and add it to a service.

CustomInputs8

 

Log out of vCAC and log back in as the user that has access to request this service.  We now have a new item to request.

CustomInputs9

 

in the last post, we just entered all of our information, but now when you start typing, the catalog item is going to search through the associated resource properties.  This allows you to select that object instead of entering a string.

CustomInputs10

 

I did the same thing for the user and I’m now ready to submit the request.

CustomInputs11

 

My service blueprint completed successfully.

CustomInputs12

 

 

Summary

Resource properties can really be a life saver if you’re deploying a lot of vCO workflows.  I should mention that you can get away without resource properties, but you’ll need to do a lot of work in vCO to take a string and convert it to an object.  Resource Properties are much easier to manage.