Specify the conditions for a provisioning rule

After you have configured all of the assignments that will implement a provisioning rule, you can create the rule, name the rule, specify the conditions that apply the rule, and then add the assignments that should be made when the rule is triggered.

Before you begin

Role required: cloud_admin

About this task

Procedure

  1. Navigate to your provider; Amazon AWS Cloud or Micorosoft Azure Cloud or VMware Cloud and click Administration > Provisioning Rules.
  2. Click New, specify a unique Name and Description for the rule, and then configure the following settings:
    Field Value
    Applies to items of type The type of resource that the rule applies to, for example, Azure VMs, Amazon EC2instances, VMware VMs, and so on. (The types are held in the sc_<provider>_cat_item tables.)
    Note: For this rule, you can add only assignments that match the Applies to items of type value that you specify here.
    Applies only to item Only consider this rule if the specified catalog item is ordered. The list is filtered based on the Applies to items of type selection.

    If this field is left blank, then the rule applies to any catalog item where the type matches the Applies to items of type value.

    Conditions on request item [Configured in the following step.]
    Order
    The system uses the Order value to determine the sequence for evaluating the rules. Rules with lower Order values are evaluated before rules with higher values.
    Note: When any rule is triggered, no additional rules are evaluated.

    This is a standard ServiceNow Order field. By carefully specifying order values for provisioning rules, you can ensure that provisioning rules with more specific conditions are evaluated before (low values) provisioning rules with more general catch-all conditions (high values).

    Active Select the check box to cause the rule to be evaluated when a user requests a cloud resource.
  3. For an AWS VPC, if the rule condition is met, then the VM is provisioned into a VPC and a VPC security group. Use the Provision request filter to set the conditions.
  4. Specify the Conditions on request item. The conditions that must be met for the rule to apply to the requested cloud resource. The field is a standard ServiceNow condition builder against the Requested Item table (sc_req_item).
    You can filter on variables that are part of the request as follows:
    1. Select Show Related Fields and then select Variables.
    2. Either leave the Select Item text box empty or match the Applies only to item value.
    3. The Select Variable text box lists all catalog variables . There are no reference qualifiers on the condition builder.
    Figure 1. Example of filtering on variables that are part of the request
  5. Save the rule definition.
    The Provisioning Rule Assignments related list appears at the bottom of the rule. The assignments that you add to the rule perform the process of configuring the variables in the requested resource.
  6. In this step, you select the assignments that implement the rule. In the Provisioning Rule Assignments related list, click Edit, select the appropriate assignments from the slushbucket and then click Save.
    Note: Best practice for automated provisioning is for a rule to configure a value for each required variable in the requested resource. When a required value is not set, a cloud operator must set the missing value.
    For Amazon EC2 VMs, the required variables are:
    • image
    • account
    For Amazon CloudFormation stacks, the required variables are:
    • account
    • stack name
    • template
    For Azure VMs, the required variables are:
    • region
    • subscription
    • resource group
    • public IP
    • computer name
    • virtual network
    • admin name
    • admin password
    • container
    • storage
    • nic
    For Azure resource groups, the required variables are:
    • subscription
    • region
    • resource group
    • deployment name
    For VMware, the required variables are:
    • datacenter
    • cluster
    • datastore
    • network
    • folder
    • clone_name
    • template
    The Provisioning Rule Assignments related list now displays the assignments in the order of the assignment Order settings.
    Note: To update the Order setting for any assignment, click the value in the list.