Blueprint-level parameters
3 minute read
Blueprint managers can associate parameters with blueprints using the Parameters tab while managing the blueprint.
Parameters include both custom fields and preconfigurations. These parameters appear when ordering the blueprint, and the values entered are associated with each build item in the deployed resource, the deployed resource itself, or both, depending on the destination the manager selects.
For example, you can use this to set the same expiration date for all servers provisioned by the blueprint, or to mark the entire resource as being associated with a particular ticket number.
Setting blueprint-level parameters
- In Cloud Management Platform, select Catalog and select your blueprint.
- On the Parameters tab, set options and constraints for a parameter at the blueprint level, just as you can for groups and environments.
These options and constraints apply only to the particular blueprint, and take precedence over any options or constraints set elsewhere.
Considerations
-
Blueprint-level parameters with build item destinations always override overlapping parameters on the item. If a blueprint-level parameter includes build items as a destination, it does not appear on the form when configuring or ordering individual build items in that blueprint. This applies to both custom fields and preconfigurations.
-
If a preconfiguration is set at the blueprint level, neither the preconfiguration itself nor the custom fields associated with it appear on any build item forms during configuration or ordering.
-
If a custom field is set at the blueprint level and a preconfiguration with that custom field is also set on a server tier, the blueprint-level value overrides the preconfiguration value for that one parameter.
- For example, if 3 is entered for a blueprint-level Mem Size but small is selected for a Server Size preconfiguration (which translates to 1 CPU and 1 GB memory), the resulting server(s) have 1 CPU and 3 GB memory.
-
To use blueprint parameters and pass information from one build step to the next by setting parameter values on the resource object, follow the syntax and examples given here:
# Replace resourceName with the appropriate value myResource = kwargs.get('resourceName') # Replace varName with the appropriate variable name, e.g. "site" if myResource: myVariable = myResource.varName # Set the new value in the variable, replace new-value myVariable = 'new-value' # Set the resource's new value. Replace varName with the appropriate variable name, e.g. "site" myResource.varName = myVariable myResource.save() # In the next build step, define the following to use the new value from the first build step # Replace resourceName, myNewVariable and varName appropriately myResource = kwargs.get('resourceName') if myResource: myNewVariable = myResource.varName
Create Blueprint Parameters permission
The Create Blueprint Parameters (blueprint.create_parameters) permission allows non-admin users to create parameters only for blueprints they can access. The Manage Blueprints (blueprint.manage) permission is required to make use of the Create Blueprint Parameters permission. This permission is assigned to specific roles.
First, see if any of the built-in roles have this permission. See Groups and permissions. Create a new role if needed and assign users who will have access to the blueprint.create_parameters permission for that role.
To assign the permission to an existing role:
- Go to Admin > Roles.
- Find the role you wish to edit.
- In the Actions column, select the edit icon to open the Modify Role form.
- In the Permissions field, select blueprint.create_parameters from the dropdown.
- Select Save changes.
To create a new role:
- Go to Admin > Roles.
- Select Add.
- Complete the form, and in the Permissions field, select blueprint.create_parameters from the dropdown.
- Select Create.
This new role is now available to assign to a group and to any users in that group.
Related
- Parameter options: How blueprint options take precedence over group and environment options.
- Order form customization: Every way to customize the order form.
- Custom forms: Map blueprint-level parameters to custom form inputs.