Add Targets

Updated 4 months ago by Archana Singh

This topic describes how to add targets to your environment. Targets are used to control which user sees the variation of a feature flag. A target can be any attribute that can be uniquely identified with an entity. For example, an application, systems, services, machines, resources uniquely identified by an IP address, email ID, user ID, etc.

Targets can be used to add users for internal testing or beta program before a broader rollout.

You can add a target using Harness UI. Alternatively, you can add a target and define its attribute in your application's code directly.

The targets added in your code are discovered automatically and populated in the Harness UI.

In this topic:

Before You Begin

Step: Add a Target

The Add Target option allows you to assign individual users to a particular flag variation.

  1. In Feature Flags, in Target Management, select Targets.
  2. Click + Target(s). A target can be any attribute that can be uniquely identified with an entity. For example, an application, systems, services, machines, resources uniquely identified by an IP address, email ID, user ID, etc.
    A target is identified by a name and an identifier.
  3. In Add Target(s), select Add a target.
  4. In Name, enter the name that will appear in the Target Management to identify this target.
  5. In Identifier, enter a unique identifier for your target. For example, an application, systems, services, machines, resources uniquely identified by an IP address, email ID, user ID, etc.

    When Targeting Users with Flags or Managing Target Groups, the targets are identified by their identifier.

    You can add multiple targets. Click + to add more targets.
  6. Click Add.

Step: Upload a List of Targets

This option allows you to export a list of users in CSV format.

  1. In Feature Flags, in Target Management, select Targets.
  2. Click + Target(s).
  3. In Add Target(s), select Upload a list of targets. A target can be any attribute that can be uniquely identified with an entity. For example, an application, systems, services, machines, resources uniquely identified by an IP address, email ID, user ID, etc.
  4. Upload your CSV file as per the template. The CSV file must have only the Name and Identifier.

    The following table lists a template, where Harness Feature Flag is the Name and FF is the Identifier.

    Harness Feature Flag

    FF

    Harness Cloud Cost Management

    CCM

    Harness Continuous Delivery

    CD@harness.io

    Harness Continuous Integration

    CI2021

  5. Click Add.

    The CSV file with a list of targets is added.

Next Steps


Please Provide Feedback