Using Custom Attributes to Add Infrastructure Metadata

You can use Commander custom attributes to provide more management information about your cloud infrastructure. For example, you could design custom attributes that enable users to apply budget or profit center code information for a VM or an asset number for an infrastructure element.

You can configure any custom attribute so that a Service Portal user can edit its value.

Once you've created custom attributes, they can be used in reporting, in workflows and in script execution.

In this topic:

Elements that custom attributes can be applied to

You can apply custom attributes to the following infrastructure elements:

  • Services, including VMs, Kubernetes namespaces, load balancers, databases, virtual services, application stacks and auto scaling groups
  • Custom attribute values applied to namespaces, virtual services, application stacks and auto scaling groups aren't inherited by their children.

  • Managed systems
  • Managed Kubernetes clusters
  • Folders
  • Datacenters
  • Compute clusters
  • Hosts
  • Resource pools
  • Datastores
  • Regions
  • Virtual networks
  • Availability zones
  • Azure resource groups
  • GCP projects
  • GCP organizations
  • GCP zones

Predefined custom attributes

The following predefined custom attributes for specific use cases are provided for convenience. They may be customized:

  • Cost Center
  • PCI Applicable
  • Primary Application
  • Project Code
  • Service Type
  • SLA
  • SOX Applicable

Additional Costs custom attribute

The Additional Costs custom attribute, which applies only to application stacks and VMs deployed from Amazon Marketplace AMIs, has a unique function.

For application stacks, this custom attribute captures the cost of resources in the application stack that aren't supported by Commander. If a value was set for Annual Stack Cost or Annual Deployment Cost in the service catalog, Commander automatically assigns a value for this custom attribute to application stacks deployed from service requests. To learn more, see Annual Stack Cost and Annual Deployment Cost.

For VMs deployed from Marketplace AMIs, this custom attribute captures costs in addition to instance type costs. If a value was set for the Additional Annual Cost in the service catalog, Commander automatically assigns a value for this custom attribute to VMs deployed from service requests for Marketplace AMIs. To learn more, see Additional Annual Cost.

This custom attribute can't be edited or deleted. Commander users can assign a value for this attribute, but Service Portal users can't.

Form-only custom attributes

You can create custom attributes that apply only to service request forms. Form attributes are useful for capturing information required only during the service request process. Form attribute values don't persist once the completion workflow has finished and aren't assigned to deployed services. Note that you also need to add the Custom Attribute or the Multi-Select element to the service request form.

Placement attributes

Placement attributes are a special type of custom attributes used in Intelligent Placement. See Configuring Attributes for Intelligent Placement.

Custom attributes based on public cloud tags

You can import public cloud tags, such as Cost Center, Business Unit, Product, Tier or Version, as Commander custom attributes. To learn how, see:

Enforcing custom attribute value formats

If your custom attribute will use a text type value, you can use regular expressions to enforce the type of format that can be used. Enforcing a format can be helpful, for example, when values will be used as input to scripts, or when VM asset information is required in order to comply with corporate standards.

We recommend that you complete all in-progress service requests before you begin using a text-type custom attribute that enforces a specific format. If a custom attribute value specified on the request form doesn't match the required format, automated deployment of the service will fail, and manual deployment will be required. Likewise, if a custom attribute value is specified in a completion workflow and the value doesn't match the required format, you'll need to edit the workflow step for any in-progress service requests.

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.
  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:  

    • Don't create an attribute that's already defined in Commander or duplicates the name of a policy within Commander
    • Don't create an attribute named Expiry Date, Primary Owner, or IT Contact, because these attributes are already available to work with the Compliance policy
    • However, you can create new custom attributes that are variations of existing attributes (for example, Cost Center Europe).

  3. Optional: Enter a Description.

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

  4. From the Type drop-down list, select the attribute type:
    • Text allows users to enter text values. You can allow either free-form text or enforce a specific format.
    • 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. See Creating relationships between custom attributes below.

      If you select Sublist, the Sublist Of drop-down appears. Select the custom attribute that will act as the "parent" attribute. See Creating relationships between custom attributes below.

    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. See Configuring Attributes for Intelligent Placement for more information.
  6. You can only enable the Placement Attribute option if the Type is set to List.

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

      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

      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.

  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:

    Text Type

    List Type

    Sublist Type

    • To allow users to enter text in any format, select Free Form.

      or

    • To enforce a format, select Specific Format.
      • In the Regular Expression field, enter a regular expression.
      • 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.
      • 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.

    Notes:

    • Text-type custom attribute values support a maximum of 4096 characters.
    • 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.

    Enter each value separately and click Add.

    You can also enter a comma-separated list of allowed values for the attribute and click Add.

    The maximum number of characters for each value is 100.

    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.

      If required, use the Move Up and Move Down buttons to arrange the allowed values in the tree.

  10. Click Finish.

Deleting custom attributes

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.

    Notes:

    • A custom attribute in use by a Compliance policy can't be deleted.
    • 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.

What's next?

  • To add the custom attribute to a request form, see Custom/Placement Attribute.
  • 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.
  • To edit a custom attribute: Select it and click Edit. 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. You can rename a list-type attribute value, move its position in the list of selectable values, or delete it from the list of values.

Creating relationships between custom attributes

You can create relationships between list-type custom attributes that are used on service request forms, so that the value selected for one custom attribute affects the selectable values for one or more other custom attributes. These relationships allow you to prevent requesters from making invalid form choices.

For example, you might want requesters to specify the machine role, either database server or web server. In this case, if they choose database server, the form could prompt them to choose a database application (Microsoft SQL or Postgres). If they choose Postgres, the form could prompt them to choose from the available Postgres versions.

The steps required to configure this example are:

  1. Create a list custom attribute called Machine Role
  2. Create a sublist attribute called Application
  3. Create a sublist attribute called Application Version
  4. Add the custom attributes to the service catalog blueprint
  5. Test the service request form

Notes:

  • The relationship between two attributes is visible only on new service request forms and service change request forms. Selectable values aren't filtered for sublist attributes when applying custom attributes to services in other ways, such as applying values directly in Commander or the Service Portal, or through workflows.
  • When the parent attribute is a placement attribute, all of its sublist attributes are also placement attributes. Likewise, when the parent attribute is a custom attribute, all of its sublist attributes are custom attributes (that is, they don't affect placement). If a custom attribute is changed into a placement attribute, all of its sublist attributes are also changed into placement attributes. If a placement attribute is changed into a custom attribute, all of its sublist attributes are also changed into custom attributes.

Create a list custom attribute called Machine Role

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

  1. On the Custom Attributes page, click Add.
  2. In the Configure Attribute dialog, enter "Machine Role" for the name.
  3. For Type, select List.
  4. From Applies To, select Form to create a custom attribute to capture information required only during the service request process, then click Next.

    Notes:

    • Form attributes aren't attached to deployed services.
    • If you apply the custom attribute to All Types, which includes forms, the relationship between attributes is visible only on request forms.
  5. On the Configure Attribute page, enter a comma-separated list of values that users can select and click Add.

    The maximum number of characters for each value is 100. For this example, type "Database Server,Web Server".

  6. Click Finish.

Create a sublist attribute called Application

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

  1. On the Custom Attributes page, click Add.
  2. In the Configure Attribute dialog, enter "Application" for the name.
  3. From Type, select Sublist.
  4. From Sublist Of, select Machine Role, then click Next.

    This option makes Application a child attribute of Machine Role.

    Define Attribute

  5. On the Configure Attribute page, for each value of the parent attribute, enter a comma-separated list of allowed values:
    • Click a value in the list and enter values in the text field, then click Add.
    • Click another value in the list and enter values for it, and click Add.
    • You can also use the Move Up and Move Down buttons to arrange the allowed values in the tree.

      The image below shows the two server types added for Database Server, but no values are added for Web Server.

      Configure Attribute dialog

  6. Click Finish.

Create a sublist attribute called Application Version

Now we'll create another level of relationship.

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

  1. On the Custom Attributes page, click Add.
  2. In the Configure Attribute dialog, enter "Application Version" for the name.
  3. From Type, select Sublist.
  4. From Sublist Of, select Application, then click Next.
  5. On the Configure Attribute page, for each application, enter available versions as shown below.

    Configure Attribute dialog

  6. Click Finish.

Add the custom attributes to the service catalog blueprint

To make these custom attributes available for a new service request, add them to the service catalog blueprint, as explained here.

You can also add the custom attributes to service-level form for a service request or a change request, see Creating new forms.

Access through:

Configuration > Custom Attributes

Available to:

Commander Roles of Superuser and Enterprise Admin

  1. Edit a service catalog entry.
  2. On the Component Blueprints page, go to the Attributes tab, and click Add Attributes.
  3. In the Add Attributes dialog, enable the three custom attributes created above, and click OK.

    Commander automatically places the attributes in the correct order, from parent to child to grandchild.

    Attributes

    You can select default values for one or more of the attributes. In this example, we aren't setting defaults.

  4. Click the Form tab of the blueprint.
  5. In the Toolbox, under Attributes, click all three attributes to add them to the form.

    Use the up and down arrow buttons to position them in a logical order.

  6. To force requesters to select a value for each attribute, click Edit, enable the Required check box, and click OK.

    Attributes Form

  7. Click Finish.

Test the service request form

Now, when a user requests a service, the component section of the form shows the three attributes. Selecting a Machine Role limits the selectable values for Application, and selecting an Application limits the selectable values for Application Version. The example below shows a request made through the Service Portal.

New Service Request

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 managed system, managed Kubernetes cluster, datacenter, folder, datastore, host or resource pool
  • a service, such as a VM, virtual service, or Kubernetes namespace

Custom attribute values set for a parent element, such as a virtual service or application stack, aren't inherited by its children.

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 Compliance Policy.

Access through:

Views > Inventory > Infrastructure, Applications, or Storage

Available to:

Administrator and All Operator Levels of Access Rights

To set a custom attribute value:

  1. Select a service or other element in the tree or in a table, then do the following:
    • For a VM, right-click and choose Lifecycle Management > Set Custom Attributes.
    • For all other elements, right-click and select Set Custom Attributes.

      The Set Custom Attributes dialog displays all available attributes for the selected element.

      To view an attribute's description, mouse over its name. Descriptions beginning with "Automatically generated from" indicate custom attributes imported from AWS, GCP or Azure tags. See also Troubleshooting: Applying custom attribute values.

  2. For a list-type custom attribute, select a value from the drop-down list. For a text-type custom attribute, enter a value (up to 4096 characters) in any or all of the Value fields.
  3. If this is a Cost custom attribute, use the Value field to enter the cost. Enter a number only, such as 500 or 67; don't enter a currency symbol. See Custom page.

  4. Click OK.

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

Troubleshooting: Applying custom attribute values

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.

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.

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.