Working with Custom Attributes

In this topic:

Creating custom attributes

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

To create a new custom attribute:

  1. On the Custom Attributes page, click Add.

    Tip: You can search for a custom attribute by name or description.

  2. In the Configure Custom Attribute dialog, enter a name for the custom attribute.

    This is the name that appears for users to select when they apply an attribute to an infrastructure element.

    Caution: Although you shouldn't create an attribute that's already defined in Commander or duplicates the name of a policy within Commander, you can create new custom attributes that are variations of existing attributes (for example, Cost Center Europe). See Predefined custom attributes.

  3. Optional: Enter a Description.

    The details that you enter here will be visible to users.

  4. From Type, select the attribute type:
    • Text allows users to enter text values. You can allow either free-form text or enforce a specific format.

      Note: Text-type custom attribute values support a maximum of 4096 characters.

    • List allows you to define values that users can select from a drop-down menu.
    • Sublist allows you to define allowed values for each value of another custom attribute. For more information, see Creating Relationships Between Attributes Used on Forms.

      If you select Sublist, the Sublist Of drop-down appears. Select the custom attribute that will act as the "parent" attribute.

    Note: If you're editing an existing custom attribute, you can't change the attribute type. If you want to change the attribute type, you must delete the attribute and create it again with a different type.

  5. To use the custom attribute for Intelligent Placement, enable the Placement Attribute option. For more information, see Configuring Placement Attributes.
  6. Note: You can only enable the Placement Attribute option if the Type is set to List.

  7. From the Applies To menu, do one of the following:
    • Select the virtual infrastructure element that you want the custom attribute to be available for.

      Note: Services includes all service types (VMs, load balancers, databases, virtual services, application stacks, auto scaling groups and Kubernetes namespaces).

    • Select Form to create a custom attribute to capture information required only during the service request process (form attributes aren't attached to deployed services).
    • Select All if:
      • The infrastructure element where you want to apply a custom attribute doesn't appear in the drop-down menu (for example, a datacenter, a Kubernetes managed cluster, or a Kubernetes namespace).
      • You want the custom attribute to be available for all infrastructure elements.

      Note: Custom attributes configured to be available for All Types can also be added to request forms through the Custom Attribute form element. In this case, selected values are applied to deployed services. See Service Request Form Elements.

  8. To allow a user to change the value of the attribute in the Service Portal, enable Edit in Service Portal.

    Notes:  

    • Service Portal users can set a value only if their role has the required permission.
    • If Commander is configured to import AWS, GCP, or Azure tags as Commander custom attributes, but isn't configured to export Commander custom attributes as tags, we recommend keeping this option disabled for all custom attributes created from public cloud tags. Otherwise, if a user sets an attribute value, the value will be removed during the next public cloud synchronization. By default, this option is disabled for all custom attributes created from imported tags.
  9. On the Configure Attribute page, configure the acceptable values for the attribute type you selected:
    • Text — Select one of the following:
      • Free Form — Allows users to enter text in any format.
      • Specific Format— Forces users to follow a set text format.
        1. In the Regular Expression field, enter a regular expression.
        2. In the Validation Error Message field, enter a message that users will see if they enter text that doesn't conform to the regular expression.
        3. In the Entry to test against field, to test your regular expression, enter text that should pass validation. For example, if you're enforcing a project code, enter a valid project code.

      Tip: To avoid format conflicts, Text Type custom attributes used in Cost Models shouldn't contain regular expressions. All custom attributes used in cost models are validated as positive numbers.

    • List — To add list values, do either of the following:

      • Enter each value separately and click Add.
      • Enter a comma-separated list of allowed values for the attribute and click Add

      The maximum number of characters for each value is 100.

      Tips:  

      • To specify a fixed cost for each value of a list type custom attribute, see Custom page.
      • To calculate a custom cost for each value of a list type custom attribute, see Calculating Custom Costs.
    • Sublist — For each value of the parent attribute, enter a comma-separated list of allowed values for the sublist attribute.
      1. Click a value in the list and enter values in the text field, then click Add.
      2. Click another value in the list and enter values for it, then click Add.

        Use the Move Up and Move Down buttons to position the allowed values.

  10. Click Finish.

Editing custom attributes

You make changes to existing custom attributes, such as the attribute's name, description, its value, or the position of those values in a selectable list.

However, you can't change the attribute type. If you want to change the attribute from a text to a list type or from a list to a text type, you must delete the attribute and configure it again.

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

To edit a custom attribute:

  1. On the Custom Attributes page, select a custom attribute, and click Edit.
  2. In the Configure Custom Attribute dialog, make the configuration changes required.
  3. Click Finish.

Deleting custom attributes

Note: A custom attribute in use by a tag compliance policy can't be deleted.

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

To delete a custom attribute:

  1. On the Custom Attributes page, select a custom attribute, and click Delete.
  2. Click Yes to confirm the deletion.

    If the custom attribute you're deleting has sublist attributes, the confirmation dialog provides a list of sublist attributes. When you confirm the deletion, the sublist attributes are also deleted.

Applying custom attribute values

Commander allows you to apply an unlimited number of custom attributes to services and infrastructure elements. You can manually apply custom attributes to:

  • An infrastructure element such as a cloud account, Kubernetes cluster, datacenter, folder, datastore, host, or resource pool.
  • A service, such as a VM, virtual service, or Kubernetes namespace.

Notes:  

  • Custom attribute values set for a parent element, such as a virtual service or application stack, aren't inherited by its children.
  • If Commander is configured to import AWS, GCP, or Azure tags as Commander custom attributes but isn't configured to export Commander custom attributes as tags, a value set for a custom attribute created from an imported tag will be overwritten during the next public cloud synchronization.

Tip: Besides manually applying custom attribute values as described here, you can also set custom attributes on a service request form, with a workflow step, during manual deployment, and through the tag compliance policy.

Access through:

Views > Inventory

Available to:

Administrator and All Operator Levels of Access Rights

To set a custom attribute value:

  1. Click the Infrastructure, Applications, or Storage tab.
  2. Select a service or other element in the tree or in a table, then do the following:
  3. For a list-type custom attribute, select a value from the drop-down list. For a text-type custom attribute, enter a value in any or all of the Value fields.
  4. Note: If this is a Cost custom attribute, use the Value field to enter the cost. Enter a number only, such as 500 or 67. For more information, see Custom page.

  5. Click OK.

    If the custom attribute has a required format, a validation error is displayed for input that doesn't match the required format.

Viewing custom attribute values

Access through:

Views > Inventory > Infrastructure, Applications, or Storage

Available to:

All Access Rights Levels

When you select a resource from the Inventory tree, you can view its custom attribute values in the Details section of the Summary page for the resource.

Note: If you don't see any custom attributes in the Details pane, right-click anywhere in the Details pane, select Pick Properties, and select available custom attributes. For more information, see Customizing the Commander Display.