Cloud Assembly input property groups usually include related settings for the user to enter or select. They might also include read-only values needed by the cloud template design.
Creating the input property group
- Go to New Property Group. , and click
- Select Input Values.
- Name and describe the new property group.
Name Property group names must be unique within a given organization. Only letters, numbers, and underscores are permitted. Display Name Add a heading for the entire group of properties, which appears on the request form. Description Explain what this set of properties is for. Scope Decide whether an administrator may share the property group with the whole organization. Otherwise, only one project can access the property group.
Although you can always add or modify properties in the group, the scope is permanent and can't be changed later.
Project When the scope is project-only, this project can access the property group. - To add a property to the group, click New Property.
The panel for adding a new property is very similar to the Inputs tab of the Cloud Assembly design page code editor.
Name Free-form name for the individual property. Only letters, numbers, and underscores are permitted. Display Name Add an individual property name to appear on the request form. Type String, Integer, Number, Boolean (T/F), Object, or Array. Default Value Preset value entry that appears in the request form.
The presence of default values affects whether input is optional or required. For more information, see User input in vRealize Automation requests.
Encrypted When selected, obscures the value when entering it into the request form and in the subsequent deployment. Encrypted properties can't have a default value. Read-only An uneditable but visible value in the request form. Requires a default. More Options Options that vary according to property type. Expand the drop-down, add any additional settings, and click Create. In the following example, the property being added represents the operating system image, and the requesting user can select from two.
Note: The operating systems shown in the example figure must already be part of the configured Cloud Assembly infrastructure. - Add more properties to the group, and click Save when finished.
Adding the property group to cloud template inputs
Even for a long list of property inputs, you only need to add the property group to make them all part of the request form.
- In the cloud template design page, above the editing area on the right, click the Inputs tab.
- Click New Cloud Template Input.
- Name and describe the property group.
Name Enter something similar to the property group name that you created earlier. Display Name Enter the same heading that you created earlier for the entire group of properties, which appears on the request form. Type Select Object. Object Type Select Property Group. Property groups list Select the property group that you want. Only property groups that are created and available for your project appear. Note that constant property groups don't appear. - Click Create.
The process creates cloud template inputs code similar to the following example.
inputs: pgmachine: type: object title: Machine Properties $ref: /ref/property-groups/machine pgrequester: type: object title: Requester Details $ref: /ref/property-groups/requesterDetails
You may also enter code directly into the Cloud Assembly design page, and take advantage of the automatic prompting as you type $ref: /ref/p...
in the code editor.
Binding cloud template resources to the property group
To make use of property group input values, add bindings under the resource.
Depending on what kind of values are in a property group, you might want to reference them individually. You can enter them separately, by property group name and property name.
resources: Cloud_Machine_1: type: Cloud.Machine properties: image: '${input.pgmachine.image}' flavor: '${input.pgmachine.flavor}'
You can also quickly add an entire set of values to a resource by referencing an entire property group.
resources: Cloud_Machine_1: type: Cloud.Machine properties: requester: '${input.pgrequester}'
Completed code
When you're finished with the inputs and resources, the finished code looks similar to the following example.
Upon deployment request, your property groups appear for the requesting user to complete.
Property groups in the Service Broker custom form editor
Input property groups appear within the Service Broker custom form interface and are available for customization there. There are no special considerations unique to property groups when customizing them. Service Broker users don't even need to know that the source of the entries is a property group instead of separately created properties.
See Customize a Service Broker icon and request form for more information.